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, Dec 18, 5:34 PM
Unknown Object (File)
Wed, Dec 18, 5:34 PM
Unknown Object (File)
Wed, Dec 18, 5:34 PM
Unknown Object (File)
Wed, Dec 18, 10:58 AM
Unknown Object (File)
Nov 25 2024, 11:47 AM
Unknown Object (File)
Nov 25 2024, 11:47 AM
Unknown Object (File)
Nov 18 2024, 1:44 PM
Unknown Object (File)
Nov 13 2024, 5:29 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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)