-
Notifications
You must be signed in to change notification settings - Fork 183
[Core] Add Support for TOTP / 2FA to LORIS #9972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f626d63
to
fdc812b
Compare
63d07b4
to
a40b8a8
Compare
@kongtiaowang is putting this on a VM for @charliehenrib to test. |
@driusan It is working well following your testing steps above. |
@driusan I just noticed that the breadcrumbs for my preferences actually brings you back to the home (dashboard) page. I think this should be fixed. Also, why do the breadcrumbs say "Configure 2FA" rather than keeping the same language as the previous page "Configure MFA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool feature!
Co-authored-by: jeffersoncasimir <[email protected]>
@charliehenrib I fixed the breadcrumbs and manual code input. I also changed the link to explicitly spell out "multi-factor authentication" but left the acronym on the page since you have to click on the link to get there and expanding it in some places would sound weird (ie. "multi-factor authentication authenticator") |
@jeffersoncasimir I have committed your suggested changes (and fixed a bug where they caused the automatic digit progression to stop working..) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM for manual testing. The only thing that you could add, but is not essential for this PR is to update the test plan for my_preferences. |
This adds support for time based one time passwords (TOTP) to LORIS based on RFC6238 (the standard used by authenticator apps such as Authy or Microsoft Authenticator).
There is a new subpage of my_preferences where a user can register an authenticator app to their account using a QR code. After validating the code, the secret key used to generate it is saved to the users table. After this point, any attempts to log in will check if they have a valid 2FA code by using a new MFA middleware. The middleware intercepts requests and prompts for the code if it has not yet been provided.
Testing instructions: