Signing in with a one-time code
- 1The server makes a six-digit code with SecureRandom and stores it in MySQL with a 10-minute expiry. Any older unused code for that email is cancelled first.
- 2Resend emails the code. The same flow is used for sign-up, two-factor login and password reset.
- 3A new code can only be requested once every 60 seconds.
- 4After five wrong tries the code stops working, so it can't be guessed.

