Page MenuHomePhabricator

[keyserver] Decouple `processSuccessfulLogin` from `logInResponder`
ClosedPublic

Authored by atul on Dec 27 2022, 10:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 5:29 AM
Unknown Object (File)
Wed, Nov 13, 5:28 AM
Unknown Object (File)
Tue, Nov 12, 7:44 AM
Unknown Object (File)
Mon, Nov 11, 2:05 PM
Unknown Object (File)
Mon, Nov 11, 11:56 AM
Unknown Object (File)
Wed, Nov 6, 6:30 AM
Unknown Object (File)
Mon, Nov 4, 6:27 AM
Unknown Object (File)
Tue, Oct 29, 3:23 AM
Subscribers
None

Details

Summary

Pull out processSuccessfulLogin from logInResponder so the logic can be reused by siweAuthResponder.

These queries are run once password/signature are validated and the user has correctly authenticated.

Test Plan
  1. Create account with password
  2. Log in to ensure things work
  3. Log out
  4. Patch this diff in
  5. Successfully able to log in again

Not a super comprehensive test plan, but it should be a pretty straightforward refactor.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D6059 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Dec 27 2022, 10:50 PM

Not really reviewing too closely, assuming it's just a refactor

This revision is now accepted and ready to land.Dec 28 2022, 6:07 AM
keyserver/src/responders/user-responders.js
193 ↗(On Diff #20202)

I might call this something other than "queries" since it also encompasses setting user cookie etc.

Maybe processSuccessfulLogin?

keyserver/src/responders/user-responders.js
193 ↗(On Diff #20202)

Yeah, that's a clearer name.. will update this diff

address feedback (rename function)

atul retitled this revision from [keyserver] Decouple `successfulLogInQueries` from `logInResponder` to [keyserver] Decouple `processSuccessfulLogin` from `logInResponder`.Dec 28 2022, 2:37 PM
atul edited the summary of this revision. (Show Details)