google / google-authenticator

Open source version of Google Authenticator (except the Android app)
Apache License 2.0
5.17k stars 966 forks source link

Google authenticator ios app giving invalid code #684

Open umr55766 opened 4 years ago

umr55766 commented 4 years ago

iphone 6s ios 13.1

Google authenticator app giving invalid key for most of the keys. Even Key Uri given in example at https://github.com/google/google-authenticator/wiki/Key-Uri-Format#examples doesn't work. Where as the same uri works in other verification apps.

image

ThomasHabets commented 4 years ago

Interesting. Since I don't have an iPhone, could you try removing parameters to see what's actually rejected? I suspect it may be the spaces in the issuer or something, but could you try to create a minimal example not accepted that should be?

umr55766 commented 4 years ago

@ThomasHabets I am bit occupied this week. I'll try to investigate a little more on this on weekend. Might get back with more details.

nilsburg commented 4 years ago

I am having the same issue: iPhone 6S, iOS 13.2

I've been testing with several parameters: Works:

Does not work:

All cases works well with Microsoft Authentificator

leodutra commented 4 years ago

Same on Android 9, ASUS Zenfone 5Z.

CraigyHK commented 4 years ago

Hi All,

We have been having this issue with one of our customers also. It works on Android perfectly, not on iPhone though (I don't have further details as to which version he has etc).

However there was a few stackoverflow answers that suggested it was the spaces within the Issuer and Label, and I have since used url encoding (as suggested) but it still throws the same error.

Figured I would post my findings in case it helps anyone fixing this :)

amzbiz commented 3 years ago

I simply removed the space in our name and it fixed the issue. It was being encoded but clearly it was breaking something on the iPhone, removing the space fixed the issue.