-
Notifications
You must be signed in to change notification settings - Fork 4
feat(2fa): add two factor authentification #875
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
Conversation
| return false | ||
| } | ||
| finally { | ||
| loading.value = false |
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.
Maybe we should reset the qrcode here? To be sure it is used once and refresh if the modal is open again?
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.
We don't want to reset qrcode on invalid code for example? Don't you think we should reset only on success? The totp isn't valid until then
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.
Yep on success, or maybe juts on modal open?
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.
It is currently reset on success, I'm not sure what you would like here
Co-authored-by: Thibaud Ollagnier <ThibaudDauce@users.noreply.github.com>
Add minimal 2FA implementation. The 2FA flow is self sufficient in udata but see also [cdata integration counterpart](datagouv/cdata#875). The settings that should be overridden if setting up 2FA: ``` SECURITY_TWO_FACTOR SECURITY_TOTP_SECRETS SECURITY_TOTP_ISSUER SECURITY_TWO_FACTOR_RESCUE_MAIL ```
| }) | ||
| }) | ||
|
|
||
| test.afterAll(async () => { |
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.
What do you think of running udata commands in test cleanup @ThibaudDauce?
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.
Don't mind :-) Could be nice to see it working if we want to do more complicated stuff like resetting the database (udata side I think) in the future
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.
I made it work by using udata working dir conf, we needed udata.cfg override in CI.
Requires opendatateam/udata#3620.
Adds hook to check if 2FA is required at login time.
Adds
tf-setupandtf-validatepages to set up and validate 2FA.TODO