- Change JSI method to accept metadata to properly auth with Identity
- Add component to call this after app is opened
- Add line to call Identity RPC using std::promise
Details
- Test if method is called
- Test if uploading works (can be done by making prekey rotation is needed) and verify this by inspecting DDB content
- Test if old cryptoModule is restored when RPC fails
Diff Detail
- Repository
- rCOMM Comm
- Branch
- prekey-rotation-2
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/components/prekeys-handler.react.js | ||
---|---|---|
23 | we could get this from IdentityServiceContextProvider - not sure what is better |
native/components/prekeys-handler.react.js | ||
---|---|---|
11 | I don't understand the purpose of this delay | |
18 | I think you can just return undefined here | |
44 | Why we are only rotating prekeys after a login? Shouldn't we also rotate prekeys when they expire? Is the idea that the app will be killed / restarted frequently enough, and the rotation will typically happen then? |
native/components/prekeys-handler.react.js | ||
---|---|---|
11 | I intended to avoid blocking the initial app load when the app seems to be slowest - but if you think this doesn't improve anything I can remove it. There is an alternative I mentioned in ENG-5889 about using native API to schedule some tasks in the background (WorkManager on Android and I think NSURLSession on iOS) but this was a lot more complicated. | |
18 | this causes consistent-return error | |
44 |
loggedIn is here only to avoid calling logic for logged-out users
Yes, that was the intention. This causes the issue that if the user is not using the app for a very long time (longer than prekey expiring time) those will never be refreshed (see my comment above about an alternative solution that fixes this issue), but on the other hand, device will also not be able to upload one-time keys |
native/components/prekeys-handler.react.js | ||
---|---|---|
23 | Emitter makes sense if we're storing the data for some time - it allows updating it. Here we're fetching it and using it immediately, and I don't see how the emitter might help. |
LGTM but I think someone else should also take a look
native/components/prekeys-handler.react.js | ||
---|---|---|
23 | makes sense |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
693 | Why was it removed? This TODO: is still relevant. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
691 ↗ | (On Diff #36166) | This line is relevant. Please bring it back. |