Engineering / ENG-1483
TOTP codes refused when the phone's clock is 40 s off
Description
Testing with a cheap Android phone whose clock runs 40 s behind: every code is refused.
Steps to reproduce
- Set a phone's clock 40 s behind. Set up MFA.
- Sign in with the code shown.
Expected: accepted. Actual: "That code didn't work."
We accept only the current 30 s step. Accept one step either side, and refuse a code already used in that window.
±1 step plus a replay check. Test added with a frozen clock.