All Collections
Network Management
Two-Factor Authentication (2FA)
How come old verification codes can be used?
How come old verification codes can be used?
Ian Maison avatar
Written by Ian Maison
Updated over a week ago

Answer from the 2FA Nuget Package documentation:

Given that this two-factor authentication method is time-based, it is highly likely that there is some time difference between your servers and the user’s device. With these PIN codes changing every 30 seconds, you must decide what an acceptable ‘clock drift’ might be. Using the above code samples, the library will default to a clock drift tolerance of +/- 5 minutes from the current time. This means that if your user’s device is perfectly in sync with the server time, their PIN code will be ‘correct’ for a 10-minute window of time. However, if their device time is more than +/- 5 minutes off from your server’s time, the PIN code displayed on their device will never match up.

Did this answer your question?