MacPass / KeePassKit

KeePass Database loading, storing and manipulation framework
Other
125 stars 40 forks source link

Lowercase QR code algorithm breaks export to Google Authenticator / clearer labels #65

Open sitsofe opened 1 month ago

sitsofe commented 1 month ago

Google Authenticator on Android rejects QR codes generated by MacPass because the algorithm isn't in capitals. The algorithm text appears to come from stringForAlgorithm in KPKOTPGenerator.m .

Additionally it would be great if the title was included in label generated for TOTP URL so that it is easier to differentiate imported keys that share the same username...

mstarke commented 1 week ago

Nice find. This this happen recently or was this an issue all the time? I did use the style from KeePassXC so I never looked anywhere else to verify if the codes worked properly. Including the title should be no problem.

sitsofe commented 1 week ago

I think it's been an issue for all time.

For anyone who may come across this in the future, an old (archived) version of the Key Uri Format specification used by Google Authenticator is on https://github.com/google/google-authenticator/wiki/Key-Uri-Format#algorithm .

mstarke commented 1 week ago

Thanks. I now remember that I did use the google spec as reference but never bothered about lower or upper case since this should not be an issue. Well. Seems like it is. This needs to be fixed then I suppose.

sitsofe commented 1 week ago

[...] since this should not be an issue

Of course you're right - it shouldn't have matter and other authenticators like Microsoft Authenticator don't mind about case so behaviour is not uniform.