antonioribeiro/google2fa-laravel

Huawei Phones

ultrono opened this issue · 2 comments

Hi,

I've implemented this package a while ago and everything has been working flawlessly.

However, I have a random user that cannot setup 2fa, the code is always incorrect.

The only difference I see for the user in question is the fact they're using a Huawei phone. Are there known issues with Huawei devices?

Thanks

mfn commented

the code is always incorrect

The OTP is sensitive to a proper synchronized time. It's not unheard that sometimes phones are off a bit and things don't work properly, e.g. https://community.signalusers.org/t/non-synchronzied-clock-causes-voice-calls-to-fail/13694 . Can you check?

All sorted. The time on the phone itself was 100% correct.

Google Authenticator apparently has its own internal clock, which when out of sync. causes generated codes to be invalid.

Quick fix for anyone who comes across this via Google:

  • tap three vertical dots in top right of Google Authenticator
  • select settings
  • select time correction for codes
  • select sync. now

After following the above the codes started to work immediately.