I have an unexpected problem when logging into PyPI. I have the 2FA set up, and after providing the username and password I enter the authenticator code - but then I get the page with the following message:
Please confirm this login
We noticed you are attempting to log in from a new or previously unrecognized device. To ensure this is you, please check your email for a login confirmation link.
You should have received an email from noreply@pypi.org with the subject line “Unrecognized login to your PyPI account”.
In the future, you can automatically trust new devices without needing email verification by using a security device or passkey as your 2FA method. See https://pypi.org/help/#utfkey for more details.
However, the email never arrives - and I don’t think there should be an email when the 2FA is set up (as the page implies) in the first place? Any help in the right direction would be very appreciated.
It has to specifically be a security key or a passkey. Logging in with TOTP will send you an email (and, if you have both TOTP and security key set up, you will be asked when logging in with TOTP, but not when using a security key).