Page MenuHomePhabricator

[keyserver] make force login configurable
ClosedPublic

Authored by varun on Mar 8 2024, 8:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 1:42 PM
Unknown Object (File)
Mon, Dec 16, 1:42 PM
Unknown Object (File)
Mon, Dec 16, 1:41 PM
Unknown Object (File)
Mon, Dec 16, 1:41 PM
Unknown Object (File)
Fri, Dec 6, 11:51 AM
Unknown Object (File)
Mon, Nov 25, 2:09 AM
Unknown Object (File)
Nov 13 2024, 4:35 AM
Unknown Object (File)
Nov 13 2024, 4:35 AM
Subscribers

Details

Summary
  • dedup'd UserCredentials in login.js and checks.js
  • used forceLogin value from user_credentials.json in login.js

Depends on D11278

Test Plan

successfully logged in to identity from keyserver with forceLogin in user_credentials.json omitted, set to false, and set to true. tested that on the rust side, the correct value (None, Some(false), Some(true) respectively) was present each time

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 8 2024, 8:41 PM
ashoat added inline comments.
keyserver/src/user/checks.js
7 ↗(On Diff #37956)

Is this change intentional? cc @inka

keyserver/src/user/login.js
96–100 ↗(On Diff #37956)

Do we need a warning for this? I'm not super opposed, but I probably wouldn't have added one

98 ↗(On Diff #37956)

Can you keep all lines to 80 chars?

This revision is now accepted and ready to land.Mar 9 2024, 7:23 PM
keyserver/src/user/checks.js
7 ↗(On Diff #37956)

yeah it was intentional. we haven't run a migration yet that requires this field or forceLogin below, so they should be optional properties. left a comment here

keyserver/src/user/login.js
96–100 ↗(On Diff #37956)

i'll just remove the warning altogether. it's not that useful to begin with and we're eventually going to have a prompt during secondary device auth that makes it unnecessary

keyserver/src/user/checks.js
7 ↗(On Diff #37956)

Thank you for fixing this!

This revision was automatically updated to reflect the committed changes.