HomePhabricator
Diffusion Comm 399567e31112

[lib] Add usePrimaryDeviceLogOut hook

Description

[lib] Add usePrimaryDeviceLogOut hook

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

Reviewers: kamil, varun, ashoat

Reviewed By: kamil, ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D12603

Details

Provenance
bartekAuthored on Fri, Jun 28, 1:17 AM
Reviewer
kamil
Differential Revision
D12603: [lib] Add usePrimaryDeviceLogOut hook
Parents
rCOMMdf174019f71a: [lib][native] Add logOutPrimaryDevice to Identity Client
Branches
Unknown
Tags
Unknown