-
Notifications
You must be signed in to change notification settings - Fork 1k
Change recovery codes filename to reflect testpypi or pypi #9190
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
Comments
@diegoe this is an excellent suggestion. If you'd like to open a Pull Request with this change the necessary logic for determining when to prefix is visible in https://github.com/pypa/warehouse/blob/60afeb136c55574b0deb6c36a2a416c951203633/warehouse/templates/base.html#L74-L76 |
I'm not positive, but the |
Yes, this should be true! I've added the "good first issue" label to this issue. |
@di I can try this issue if you can give me more context. |
@Abid1998 I'm not di, but commenting for additional context: If you set up an account, verify your email address, and set up 2-factor authentication, the "Account Settings" menu gives you an additional option for generating/regenerating account recovery codes. These codes can be used to get access to your account in the event your 2-factor authentication device becomes inaccessible, gets lost, breaks, etc. Once you generate some codes, you have the option to download them as a text file. (I generated these codes running warehouse on localhost, but figured I should partially black them out anyway.) This would be changing the default name for that text file to "TestPyPI-Recovery-Codes.txt" when you're on Hope this helps! |
* Fixing recovery code filename for test site (fixing #9190) * Fixing translations * Simplifying logic for consistency with other templates Co-authored-by: Dustin Ingram <[email protected]>
I think it's all good now, thanks. |
What's the problem this feature will solve?
Currently if you generate recovery codes for testpypi and pypi, both files are suggested for download as
PyPI-Recovery-Codes.txt
.Describe the solution you'd like
The suggested filename reflects the origin. Example:
TestPyPi-Recovery-Codes.txt
andPyPi-Recovery-Codes.txt
.Additional context
It should be possible to change it to an if/else to set a prefix at:
https://github.com/pypa/warehouse/blob/main/warehouse/templates/manage/account/recovery_codes-provision.html#L64-L66
The text was updated successfully, but these errors were encountered: