We’ve been using PI for several years now, but over the past few months, we’ve had a couple users, myself being one, complain about tokens TOTP tokens that stop working. In the PI logs, you see bad totp token.
The users that have the issue connect every day, sometimes multiple times a day. A new token will work fine for a few weeks to a month, then stop working.
Looking at a currently affected user, I just noticed that the timeshift on the token is -410.
Clearly this is a symptom of clock drift correct? But now I’m wondering how. We both have been using Authy as the client. The TOTP servers and ADFS servers all have their clocks synced from Active Directory, which is synced to an internet time source.
Both computers and phones that the token client is installed on (as it’s Authy they are in sync on the phone and computer), are synced with internet time sources.
Is there something I’m missing here? With all devices synced, how can the timeshift get off by 410 seconds?
Is there any troubleshooting we can do in the moment to see what could be causing this?
Oviously the time of the smartphone got wrong over time.
If the timeshift is -410 seconds, then privacyIDEA assumes, that the clock of the TOTP token is off by 410 seconds. Thus privacyIDEA will check otp values in a timewindow of 180 seconds of by 410 seconds.
If the time of the smartphone is then corrected again, then privacyIDEA will check the OTP value in a timewindow of by 410 secs. But the smartphone calculated the otp value based on the correct time.
This way it will fail.
Manage the time of your smartphon in a reliable way!
So I have the same token on two devices, my cell and my laptop, two different apps (not that it matters). They both are 100% lock step in sync. If it was a time drift issue, the two devices would show different tokens at the same time correct? Since we’ve had this issue, I have both devices and both apps open at the same time when authenticating to rule that out.
Also, why would the timeshift be off immediately after a resync?
I have both the server and my client using the same public time server, both are completely in sync. However when I sync my token, I get a timeshift value (7.74954390526). I would think it wold be almost nonexistent since they are based off the exact same clock values.
Also, I can’t get some tokens to resync (-410 timeshift). The Sync Window is 1000 and the count_auth is only 67. It doesn’t seem like it should not be able to resync within that period.