Page MenuHomePhabricator

[lib] Clear all holders on logout
ClosedPublic

Authored by bartek on Sep 20 2024, 7:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:43 PM
Unknown Object (File)
Fri, Nov 1, 5:57 AM
Unknown Object (File)
Fri, Nov 1, 5:35 AM
Unknown Object (File)
Tue, Oct 22, 10:40 AM
Unknown Object (File)
Tue, Oct 22, 10:22 AM
Unknown Object (File)
Mon, Oct 21, 9:18 AM
Unknown Object (File)
Sun, Oct 20, 7:14 PM
Unknown Object (File)
Mon, Oct 14, 12:44 PM
Subscribers

Details

Summary

Created a hook that removes all holders from holder store, using the "process holders" action.
Called the hook in useLogOut() which is called for all logout actions (identity v1, legacy, primary/secondary).

Depends on D13411

Test Plan

Established a few holders, then logged out. Verified that Blob Service was called

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sep 23 2024, 12:23 AM
lib/actions/holder-actions.js
143

Leftover

Accepting for now, some more context about why this isn't ideal in ENG-9351.

lib/actions/user-actions.js
210

removeAllHolders might throw - I think we should avoid this to allow callKeyserverLogOut to finish, we should do something similar to identityPromise.

On the other hand, maybe it is worth starting this promise before Identity logout, without awaiting to make it more realistic to resolve before removing CSAT but without blocking the logout call.

This revision is now accepted and ready to land.Sep 23 2024, 4:29 AM

I agree with @kamil that we should avoid log out throwing... the user should always be able to log out

Made promise non-throwing and moved before Identity logout

This revision was automatically updated to reflect the committed changes.