Skip to content

Improve key handling: strip and remove whitespace before generating TOTP - #16

Open
yuanchaodu wants to merge 1 commit into
susam:mainfrom
yuanchaodu:main
Open

yuanchaodu wants to merge 1 commit into
susam:mainfrom
yuanchaodu:main

Conversation

@yuanchaodu

Copy link
Copy Markdown

Some users may paste TOTP secrets(from Google authenticator、Microsoft authenticator) with spaces for example:
"JXQ7 M3B5 YV4G 2NQK HWED 6TLP 3UCA R7FI".

This change adds two normalization steps:

  • strip(): remove leading/trailing whitespace
  • split()+join(): remove internal spaces

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.

1 participant