Here is how 2FA works:
*The server creates a secret code.
*You scan the qr code with Google authenticator(or similar app).
*Your phone saves that secret code.
*Now both the server and your phone have the same secret.
*Every 30 seconds, both use the current time + the secret to generate a new code.
*They use hmac-sha1 to generate the code.
*When you enter the code, the server generates the code too and compares them.
*If they match, you are authenticated.
*The phone does not need internet because it only needs the secret and the current time.
4August 9, 2026 135