[ENG-12251] added two-factor auth for admin panel - #11929
Open
ihorsokhanexoft wants to merge 1 commit into
Open
ihorsokhanexoft wants to merge 1 commit into
ihorsokhanexoft wants to merge 1 commit into
Conversation
brianjgeiger
requested changes
Sep 18, 2026
brianjgeiger
left a comment
Collaborator
There was a problem hiding this comment.
One thing I'd like to change if we can.
Comment on lines
+67
to
+82
| # to not lose creds after login request, we save them as initial values | ||
| # and use HiddenInput to not display them | ||
| if isinstance(form, LoginForm): | ||
| self.form_class = TwoFactorForm | ||
| return render( | ||
| request, | ||
| 'two_factor.html', | ||
| { | ||
| 'form': self.form_class( | ||
| initial={ | ||
| 'email': email, | ||
| 'password': password | ||
| } | ||
| ) | ||
| } | ||
| ) |
Collaborator
There was a problem hiding this comment.
This makes me uncomfortable. Is it absolutely necessary that we re-auth the user when we do the two factor check? It might be better to accept that if someone leaves a partially logged-in page open and changes their password that they could still login if they have the two-factor. It seems better than transmitting the unencrypted password to the page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
https://openscience.atlassian.net/browse/ENG-12251
Changes
Admins can sign in into admin panel only by using correct email + password, having two-factor config enabled and confirmed + using a verification code for each log in