Google 2 factor authentication fails randomly
Article ID: 48 | Rating: 5/5 from 1 votes | Last Updated: Mon, Mar 12, 2018 at 6:35 AM
Google 2 factor authentication does not work all the time
The server time is incorrect. The time on the server needs to be synchronized with a time server. Even, if the time on the server has an offset of 5-10 seconds, the google 2factor authentication would have random failures.
Use the command to correct the server time.
ntpdate pool.ntp.org
Also, do ensure the time on your mobile phone is correct as well. Sync the time on your mobile with that your mobile operator to ensure that time is accurate.
The battery on the motherboard could be weak or failing which may cause the server time to fall behind a few seconds. Its recommended to keep the above command added as a cronjob.