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)
Mon, Nov 11, 11:03 AM
Unknown Object (File)
Mon, Nov 11, 7:53 AM
Unknown Object (File)
Mon, Nov 11, 6:52 AM
Unknown Object (File)
Sun, Nov 10, 10:07 PM
Unknown Object (File)
Fri, Nov 1, 11:53 PM
Unknown Object (File)
Oct 2 2024, 5:11 PM
Unknown Object (File)
Oct 2 2024, 5:11 PM
Unknown Object (File)
Oct 2 2024, 5:11 PM
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
No Lint Coverage
Unit
No Test Coverage

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