Expand description
The password + Secret Key login state machine.
One attempt runs: start a session (registering the device if the server asks), exchange SRP, confirm the key, then complete authentication over the MAC-signed encrypted channel, driving 2FA when the account requires it.
Enumsยง
- Login
Outcome ๐ - The result of a single login attempt: a finished session, or a rejected OTP that asks for a full restart.
Constantsยง
- AUTH_
COMPLETE_ ๐ENDPOINT - AUTH_
METHODS_ ๐ENDPOINT - AUTH_
START_ ๐ENDPOINT - MAX_
DEVICE_ ๐ATTEMPTS - How many times the server may send us back to register or reauthorize the device before we give up. One round is the normal case.
Functionsยง
- fetch_
auth_ ๐methods - Confirms the account offers a given auth method.
- login_
attempt ๐ - Runs one full login sequence: start a session, exchange SRP, verify the key, and drive 2FA if the server asks for it.
- start_
new_ ๐session - Starts a new session, looping through device registration/reauthorization until the server returns SRP parameters.
- verify_
session_ ๐key - Completes authentication over the MAC-signed, encrypted channel, returning the enabled 2FA methods when the account needs a second factor.