-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Require email confirmation for TOTP-based logins #18689
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
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.
Lots of comments inline. Let me know if they need further details.
Aside: I wonder if there's an opportunity to use these kinds of "annoying" interactions to push webauthn more, but I still want that to be a smoother experience.
def send_unrecognized_login_email(request, user, *, ip_address, user_agent, token): | ||
return { | ||
"username": user.username, | ||
"ip_address": ip_address, |
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.
suggestion: include geo data as well
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.
When running a manual verification, the email sent was only text, not HTML. Any clue as to why?
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.
Are you talking about the ConsoleAndSMTPEmailSender
in local dev? I don't think it displays HTML, only text:
warehouse/warehouse/email/services.py
Line 157 in f891447
Text: {message.body_text}""" |
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 am - one line above it is the note that you can visualize the HTML version in MailDev, which usually displays something richer for other emails.
Fixes #18425.
This PR maintains a record of device information across logins for each user: