Page MenuHomePhabricator

[lib] Add usePrimaryDeviceLogOut hook
ClosedPublic

Authored by bartek on Jun 28 2024, 2:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 3:13 PM
Unknown Object (File)
Mon, Dec 23, 3:13 PM
Unknown Object (File)
Mon, Dec 23, 3:12 PM
Unknown Object (File)
Mon, Dec 23, 3:12 PM
Unknown Object (File)
Mon, Dec 23, 8:40 AM
Unknown Object (File)
Thu, Dec 12, 9:37 AM
Unknown Object (File)
Sat, Dec 7, 8:38 PM
Unknown Object (File)
Thu, Nov 28, 8:11 PM
Subscribers

Details

Summary
  • Added new primary_device variant to logOutType in useLogOut() hook. Modified the hook to call the correct Identity RPC. It is defined only on native so required a check.
  • Added usePrimaryDeviceLogOut() hook which calls the previous one with the proper method. In future diffs, it will be updated to send Tunnelbroker messages to peers.

For reference, the previous hook for secondary device was introduced in D12221

Depends on D12586

Test Plan
  • Made sure that identity logout still works as before and keyserver logout is triggered.
  • Made sure that setting logOutType: 'primary_device' actually calls the correct Identity RPC

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable