Page MenuHomePhabricator

[keyserver] Add function to clear identity metadata
AcceptedPublic

Authored by bartek on Mon, Nov 18, 6:50 AM.
Tags
None
Referenced Files
F3364822: D13957.diff
Mon, Nov 25, 5:12 AM
Unknown Object (File)
Sun, Nov 24, 8:19 PM
Unknown Object (File)
Sat, Nov 23, 4:30 AM
Unknown Object (File)
Sat, Nov 23, 1:33 AM
Unknown Object (File)
Tue, Nov 19, 5:09 AM
Unknown Object (File)
Tue, Nov 19, 5:06 AM
Unknown Object (File)
Tue, Nov 19, 5:06 AM
Subscribers

Details

Reviewers
varun
kamil
ashoat
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.Thu, Nov 21, 9:13 AM
This revision is now accepted and ready to land.Thu, Nov 21, 11:09 AM
ashoat added inline comments.
keyserver/src/user/identity.js
131 ↗(On Diff #45864)

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

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>