Skip to content

(Add) Button to copy 2fa recovery codes #4874

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

Open
wants to merge 15 commits into
base: development
Choose a base branch
from

Conversation

PythonCoderAS
Copy link

@PythonCoderAS PythonCoderAS commented Jul 30, 2025

Partially fix #4873

PSA: If you want something to currently output the codes in a form that is easy to copy-paste, run this in the console:

console.log(document.querySelector("pre").innerText.trim().replaceAll(/\s{2,}/g, "\n"))

@PythonCoderAS PythonCoderAS changed the title Convert pre to div Add button to copy recovery codes Jul 30, 2025
@Roardom
Copy link
Collaborator

Roardom commented Jul 30, 2025

What happens when you paste the contents into e.g. a password manager additional field that only accepts a single line as input? Will the codes concatenate into a single long code? Can you ensure this usecase retains at least a single space between each code?

@PythonCoderAS
Copy link
Author

What happens when you paste the contents into e.g. a password manager additional field that only accepts a single line as input? Will the codes concatenate into a single long code? Can you ensure this usecase retains at least a single space between each code?

I do not have one of those password managers, but in every single input field that is single-line only, newlines get turned into spaces.

I confirmed this with this following URL in the browser: data:text/html,<input type="text" style="width: 100%">

This gives a single-line text input, and pasting anything with newlines converts them to spaces.

@HDVinnie HDVinnie changed the title Add button to copy recovery codes (Add) Button to copy 2fa recovery codes Jul 30, 2025
@HDVinnie HDVinnie changed the base branch from master to development July 30, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] Allow copying all 2FA recovery codes to clipboard
3 participants