Login methods
An environment’s login methods are the ways its users can prove who they are. Every method is a switch, and the login UI shows exactly the methods that are on, in the embedded login and on the hosted page alike. The apps of a group share one set of methods, because they share their users.
The catalogue
Section titled “The catalogue”| Id | Method | Way in | Second factor |
|---|---|---|---|
email_code |
A 6-digit code sent to the user’s address. | Yes | No |
password |
An email address and a password. | Yes | No |
passkey |
A passkey made in the user’s account settings. See Passkeys. | Yes | Yes |
google, apple, github, discord, x, microsoft |
A social login. See Social and custom providers. | Yes | No |
custom-… |
A provider of your own that speaks OpenID Connect or OAuth 2 (Pro and Scale plans). | Yes | No |
solana, evm |
A wallet signs a message. See Wallets. | Yes | No |
phone |
Codes by SMS. | Not available yet |
The second factors themselves (an authenticator app, a passkey, recovery codes) are the user’s own, set up in account settings, and are described in Two-step login. A passkey works as a second factor as soon as the environment has a passkey domain, even with the passkey login method off.
A new environment starts with email_code on, sign-up open and two-step login optional. Email codes need no setup, so a new app logs users in at once.
Turning methods on
Section titled “Turning methods on”In the dashboard, open Login methods for the environment and switch methods on or off. The same with the management API (admin role):
PUT /v1/environments/{environment_id}/login-methodsAuthorization: Bearer sk_dev_...Content-Type: application/json
{ "methods": ["email_code", "password", "google"] }The set is saved in catalogue order, with custom providers after the built-in ones. A save is refused (400) when:
- a method is not available yet (
phone); passkeyis on and the environment has no passkey domain yet;- a social method has no credentials in this environment. In a development environment the platform’s shared credentials count; production environments need your own;
- an id is unknown;
- no method would stay on.
See Environments for the full request and response.
Embedded login and hosted page
Section titled “Embedded login and hosted page”There are two doors to the same login. The embedded login runs inside your own page (auth-react’s modal, or a UI of your own on /authorize-challenge). The hosted page is served by SeekAuth on the issuer host and is reached by redirecting to /authorize. Both apply the same steps, the same rules and the same limits, and both end with an authorization code for your client. Social and custom providers always leave through a redirect, even from the embedded login. See How login works.
Email codes
Section titled “Email codes”- A code is 6 digits and expires 10 minutes after it was sent. The email says so.
- Five wrong answers end a code, whether the sixth would have been right or not. The login UI shows how many tries are left. After that, or once the code expired, the user asks for a new one.
- Asking again sends a fresh code and the old one stops working. There is no waiting time between codes, but code emails are rate limited per address, per inbox and per caller.
- The answer is the same whether or not the address has an account. When sign-up is closed, or the account is disabled, the login looks the same and no email is sent.
- A code to an address nobody has creates the account when it is entered, if sign-up is open. See Sign-ups and access.
Passwords
Section titled “Passwords”Passwords follow length rules only, with no rules about kinds of characters:
| Environment’s two-step login | Shortest | Longest |
|---|---|---|
| Optional (the default) | 15 characters | 64 characters |
| Required | 8 characters | 64 characters |
- A new password (at sign-up, at a reset, or from account settings) is checked against known data breaches with the Pwned Passwords range API. Only the first five characters of the password’s SHA-1 hash leave SeekAuth, and the request is padded. A password found there is refused with “This password appeared in a data breach. Choose another one.” If the breach service does not answer, the password is not refused for it.
- Passwords are stored as argon2id hashes (19 MiB of memory, two passes, one lane).
- A wrong password, for an account that exists or not, answers “Wrong email or password.” and takes as long either way.
- Someone whose address is not verified yet is sent a code to verify it first.
Resetting a password
Section titled “Resetting a password”- The user asks for a reset with their address. The answer is always the same; a code goes only to an account that exists and is active.
- They enter the code from the email. A user with a second factor is asked for it now, before anything changes: the code proved the mailbox, which is one factor.
- They are asked for a new password, and it is set. Every session of the user ends, with its tokens, they are emailed that the password changed, and the login goes on.
A reset sets a password only for the account that still has the address its code went to: if the account moved to another address while the reset waited, the reset starts again.
The password method has to be on for resets to work. A signed-in user changes or removes their password through the account API.