You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.
The principle of TOTP/Google Authenticator is that both devices generate a code based on time + secret. If one of those two components isn't in sync, they'll generate a different code. So:
Check the secret used in your device matches the secret configured for the account
Check the server time is in sync with your device time, ideally both are in sync with UTC (most common reason for this issue)
The time window for each code is 30 seconds, so if the time difference between server/device is too large codes will be out-of-sync and it will be hard or impossible to hit the right code. You could also increase the window setting, so accept more codes around the current valid one:
# config/packages/scheb_two_factor.yamlscheb_two_factor:
google:
window: 1# How many codes before/after the current one would be accepted as valid
Bundle version: latest version
Symfony version: 4.4
Description
I managed to make it work just fine in localhost, but when I try to use on PROD it always fails when I use:
$this->googleAuthenticator->checkCode($user, $code)
Additional Context
Any idea what may be the cause of the issue?
The text was updated successfully, but these errors were encountered: