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 24, 7:26 AM
Unknown Object (File)
Fri, Nov 22, 12:06 PM
Unknown Object (File)
Fri, Nov 22, 11:20 AM
Unknown Object (File)
Wed, Nov 20, 10:36 AM
Unknown Object (File)
Wed, Nov 20, 10:36 AM
Unknown Object (File)
Wed, Nov 20, 10:36 AM
Unknown Object (File)
Wed, Nov 20, 10:35 AM
Unknown Object (File)
Wed, Nov 20, 10:35 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #44390)

Leftover

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

lib/actions/user-actions.js
210 ↗(On Diff #44390)

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.