Page MenuHomePhabricator

[keyserver] Add function to clear identity metadata
ClosedPublic

Authored by bartek on Nov 18 2024, 6:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 2:31 AM
Unknown Object (File)
Mon, Dec 16, 2:31 AM
Unknown Object (File)
Fri, Dec 13, 8:52 PM
Unknown Object (File)
Fri, Dec 13, 1:37 AM
Unknown Object (File)
Mon, Dec 9, 6:43 AM
Unknown Object (File)
Thu, Dec 5, 7:34 PM
Unknown Object (File)
Wed, Dec 4, 8:49 PM
Unknown Object (File)
Tue, Dec 3, 5:49 PM
Subscribers

Details

Summary

Partially addresses ENG-6545.
Added a function to clear user ID and access token from metadata table. It's going to be called when service authentication fails.

Test Plan

Called this function manually and verified in TablePlus that these rows were removed. Calling verifyUserLoggedIn() creates them again.

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.Nov 21 2024, 9:13 AM
This revision is now accepted and ready to land.Nov 21 2024, 11:09 AM
ashoat added inline comments.
keyserver/src/user/identity.js
131

Nit: this query will crash if passed an empty array. We don't do that currently, but I've seen this accidentally happen enough times that I usually try to cover it

136

I think it would be better to return Promise<void>. The QueryResult type has some anys and you never seem to use it from any of the callsites of clearMetadata currently in this stack

Add zero-length check, return Promise<void>