HomePhabricator
Diffusion Comm 99964df8a094

[identity] Implement RPC to log out secondary device

Description

[identity] Implement RPC to log out secondary device

Summary:
Implementation of the RPC described in D12119. Details and linked issues there.
This RPC needs to:

  • Verify if the device is on the device list
  • Clear device CSAT
  • Clear device data (prekeys etc)
  • Clear OTKs

Depends on D12119

Test Plan:

  • Registered a user (Identity-auto created device list with primary device).
  • Logged in with a second device (secondary device added to the list)
  • Called the RPC on the secondary device
    • Confirmed that CSAT as well as device keys were cleared by viewing DDB tables
    • Confirmed that the device ID still exists on the device list

Also confirmed that the RPC fails:

  • If the device is not on the device list
  • If the device is a primary device

Reviewers: varun, will, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on May 19 2024, 1:49 AM
Reviewer
kamil
Differential Revision
D12120: [identity] Implement RPC to log out secondary device
Parents
rCOMMd97f0a2457d3: [protos] Add RPC for secondary device logout
Branches
Unknown
Tags
Unknown