Answer with the tokens ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: the password is right
- Apply the verified-account gate: the address is confirmed, or the gate is off
- Read the user, for its enabled flag: the user is enabled
- Sign an access token for the system client: the access token is signed, and a refresh token of 32 random bytes generated
- Store the refresh token, hashed, as a new family: the refresh token is stored
- Record the sign-in: the event is recorded
- Record the time of the sign-in on the user: lastLoginAt is written
- Settle the counted attempt: the attempt is settled
|
Refuse a locked-out address ends here | The address being signed in to, or the client address, is locked out: the realm's bruteForce.maxAttempts attempts were counted on it within its bruteForce.windowSeconds, and its bruteForce.lockoutSeconds have not passed (#528: the realm's policies, which the FAILED_LOGIN_* keys seed in a new realm); or this attempt reached the threshold together with another one, which armed the lockout first, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: an identifier is locked out; the floor is waited out
|
Refuse an attempt inside the account's wait ends here | The account the address names, held or not, is inside the wait of its failure ladder: from its 5th consecutive counted failure, the n-th makes the next attempt wait 2^(n-5) seconds, at most 15 minutes; and the client address has not signed in to the account in the last 30 days, or 20 of the run's counted failures already came from addresses that have (#968), the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the account is inside its wait; the floor is waited out
|
Refuse the attempt when the failure ladder cannot answer ends here | The failure ladder's store (Redis) or the realm's cookie key cannot be read in time, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the ladder cannot answer; user.sign_in_failed is recorded with the reason internal_error, and the floor is waited out
|
Refuse an address with no account, like a wrong password ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has no password credential in this realm, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: no credential has this address; the decoy hash is verified, and the floor waited out
|
Refuse a wrong password ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has a password credential in this realm, its address confirmed, and its user is enabled, it is another one, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: the password does not verify against the hash; the floor is waited out
|
Refuse an unconfirmed account under the gate, like a wrong password ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has a password credential whose address is not confirmed yet, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: the password is right
- Apply the verified-account gate: the address is not confirmed, and the gate is on; the floor is waited out
|
Refuse a disabled user, like a wrong password ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has a confirmed password credential, and its user is disabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: the password is right
- Apply the verified-account gate: the address is confirmed, or the gate is off
- Read the user, for its enabled flag: the user is disabled; the floor is waited out
|
Refuse a body that does not match the login schema ends here | The body does not pass the schema: an email that is not an address or is longer than 254 characters, a password longer than 256 characters, a missing field. An empty password passes the schema here, unlike on the form, and is counted and refused like a wrong one, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body does not match the schema
|
Refuse a host QAuth does not answer for ends here | The host names no realm, a disabled realm or a realm with no issuer, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the host names no enabled realm with an issuer
|
Refuse a request over the login limit ends here | The client address has used up its login requests for the window, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address has used up its login requests
|
Fail on a store error ends here | The host is a host of an enabled realm with an issuer, the address is under its limit, the body passes the schema, and neither the address being signed in to nor the client address is locked out, the address has a password credential in this realm, its address confirmed, and its user is enabled, the posted password is the credential's, the realm's accounts.requireVerifiedAccount is on, the default (#528); REQUIRE_VERIFIED_ACCOUNT unset, blank or true seeds it so in a new realm | - Wait for a sign-in request: POST /auth/login arrives with an email address and a password
- Find the realm of the host: the request has its realm
- Count the request against the login limit: the address is under its limit
- Check the body against the login schema: the body matches the schema
- Refuse a locked-out address, else count the attempt: the attempt is counted on the address being signed in to and on the client address
- Reserve the attempt on the account's failure ladder: the attempt is counted on the account's ladder, and the next wait set
- Check the password: it fails, because the database fails
|