Page MenuHomePhabricator

[lib] Add usePrimaryDeviceLogOut hook
DraftPublic

Authored by bartek on Fri, Jun 28, 2:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 6:04 AM
Unknown Object (File)
Fri, Jun 28, 6:04 AM
Unknown Object (File)
Fri, Jun 28, 6:04 AM
Subscribers
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
kamil
varun
ashoat
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
No Lint Coverage
Unit
No Test Coverage