You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TOTP generation fails when Base32 secret is not properly padded (missing padding handling) #1546
TOTP generation is unable to handle padding on secret keys that aren't mod 8 via QRCodes.
To reproduce:
Import TOTP via QR code that isn't mod 8 or is padded to be mod 8
Compare the generated TOTP with other authenticators (Google, Microsoft, Authy)
The codes won't match due to missing padding
Example secrets that won't scan correctly:
otpauth://totp/Example:User?secret=J3WWIV3PTGJPQV5QAICM&issuer=Example
otpauth://totp/Example:User?secret=J3WWIV3PTGJPQV5QAICM====&issuer=Example
This issue was fixed in https://github.com/VastBlast/authenticator-2fa which is a project I started, inspired by this one. Unfortunately this project does not seem to be maintained anymore. Feel free to open any issues there if you have any.
Activity
VastBlast commentedon Jul 10, 2026
This issue was fixed in https://github.com/VastBlast/authenticator-2fa which is a project I started, inspired by this one. Unfortunately this project does not seem to be maintained anymore. Feel free to open any issues there if you have any.
fix(otp): decode unpadded base32 secrets to whole bytes