KeePassKit icon indicating copy to clipboard operation
KeePassKit copied to clipboard

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

Open sitsofe opened this issue 1 year ago • 5 comments

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...

sitsofe avatar Oct 14 '24 20:10 sitsofe

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.

mstarke avatar Nov 11 '24 14:11 mstarke

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 .

sitsofe avatar Nov 11 '24 14:11 sitsofe

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.

mstarke avatar Nov 12 '24 07:11 mstarke

[...] 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.

sitsofe avatar Nov 12 '24 08:11 sitsofe

Is this issue still present? I was about to change the code to return upper case but I'm not sure this is still relevant.

mstarke avatar Nov 13 '25 20:11 mstarke