Page MenuHomePhabricator

[native] Create initial device list during registration
ClosedPublic

Authored by bartek on May 16 2024, 12:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Aug 29 2024, 5:40 AM
Unknown Object (File)
Aug 27 2024, 1:32 AM
Unknown Object (File)
Aug 26 2024, 1:41 PM
Unknown Object (File)
Aug 1 2024, 12:46 AM
Unknown Object (File)
Aug 1 2024, 12:46 AM
Unknown Object (File)
Aug 1 2024, 12:46 AM
Unknown Object (File)
Aug 1 2024, 12:45 AM
Unknown Object (File)
Aug 1 2024, 12:45 AM
Subscribers

Details

Summary
  • Extracted utility function to generate RawDeviceList from given list of devices and current timestamp.
  • Created a function to create and sign initial device list - it creates a singleton array [primaryDeviceID], then signs via Olm.
  • Called the function in registerWalletUser and registerPasswordUser functions of identityClient

Depends on D12066

Test Plan
  1. In Identity Service, printed the value of initial_device_list in RPC handlers
  2. Registered a password user and a wallet user
  3. Confirmed that device list JSON payload is printed in Identity

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 16 2024, 12:53 AM
bartek added inline comments.
lib/shared/device-list-utils.js
124 ↗(On Diff #40277)

Not sure if this is the best place for this function, it is going to be called only on native.

kamil added inline comments.
lib/shared/device-list-utils.js
124 ↗(On Diff #40277)

I think it's okay - this function is implemented in a way that can be used on both platforms if ever needed.

This revision is now accepted and ready to land.May 16 2024, 1:58 AM