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, Nov 22, 7:51 AM
Unknown Object (File)
Tue, Nov 12, 4:55 PM
Unknown Object (File)
Sun, Nov 10, 8:41 PM
Unknown Object (File)
Fri, Nov 8, 7:31 AM
Unknown Object (File)
Sun, Oct 27, 5:11 PM
Unknown Object (File)
Oct 18 2024, 7:40 AM
Unknown Object (File)
Oct 18 2024, 7:40 AM
Unknown Object (File)
Oct 18 2024, 7:39 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