-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Don't include issuer in URI path when it is included as a parameter #47
Conversation
Guess I didn't do full due diligence on this before. FreeOTP Authenticator doesn't recognize the issuer query parameter and Google Authenticator will apparently ignore the label part if the issuer there matches the query string parameter. So:
|
The problem with the provisioning uri is that it is not part of the RFCs. Have you tried to use '%3a' instead of ':' to separate the label and the issuer? Some applications use this separator (I don't remember how Google Authenticator works). |
In my application I am using So for compatibility with at least Google Authenticator and FreeOTP authenticator, I am now including the issuer in both places (query string and path). Both seem to be happy with it now. |
OK thanks for the information. |
Found this which may be helpful when documenting: https://github.com/google/google-authenticator/wiki/Key-Uri-Format Specifically,
Which explains why I could only get labels working in multiple apps using both label and query string parameter. |
Please update the library. Thanks. |
Tagged |
I noticed when testing with QR codes that Google Authenticator doesn't recognize the issuer when the
otpauth://totp/Issuer:Label?secret=1234
scheme is used and it instead needs to beotpauth://totp/Label?secret=1234&issuer=Issuer
.This minor change makes it so if the
isIssuerIncludedAsParameter()
property is true, the path component won't get the issuer, and instead it will be a query parameter as is already the case.Feel free to merge if this change makes sense overall.