Page MenuHomePhabricator

[native] update Tunnelbroker init message to rely on Identity `userID`
ClosedPublic

Authored by kamil on Dec 18 2023, 4:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 5:56 AM
Unknown Object (File)
Wed, Jun 26, 12:27 AM
Unknown Object (File)
Tue, Jun 25, 8:07 PM
Unknown Object (File)
Sun, Jun 23, 11:42 PM
Unknown Object (File)
Sat, Jun 22, 1:39 PM
Unknown Object (File)
Sat, Jun 22, 10:11 AM
Unknown Object (File)
Wed, Jun 12, 6:14 AM
Unknown Object (File)
Mon, Jun 3, 4:29 AM

Details

Summary

To authenticate we need to use ID assigned by identity.
I added accessToken as a dependency to fetch new Services Metadata each time CSAT changes (it should be caused by the event emitter that @marcin is implementing) so I think this should be safe and avoid any race conditions.

Note: This code is used for testing anyway and will change after making logging to Identity mandatory,

Depends on D10327

Test Plan
  1. Login to staging Identity (loginPasswordUser).
  2. Call setCommServicesAuthMetadata.
  3. Dispatch action with the new access token.
  4. Check if the connection with staging Tunnelbroker was created.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 18 2023, 6:46 AM
marcin added inline comments.
native/utils/tunnelbroker-utils.js
17 ↗(On Diff #34783)

Could you rename contentSigningKey to deviceID? It makes more sense in this case.

This revision is now accepted and ready to land.Dec 20 2023, 7:20 AM
native/utils/tunnelbroker-utils.js
17 ↗(On Diff #34783)

it's on purpose because deviceID is already defined in line 12