Sign-in methods
Pick who runs sign-in, keep your own user IDs and put passkeys first. Provider logins, passwords, email links and TV sign-in each need their own care.
- Required 5
- Recommended 8
- Optional 2
Required
Verify every passkey answer on the server
ACC-9Accept a passkey sign-in only after the server checks the challenge, origin, relying party ID, user flags and signature with a maintained WebAuthn library.
Link a provider login only to an account its owner controls
ACC-12Never join a provider login to an existing account because the email addresses match. Link it after the person signs in to that account, or under the trusted-issuer exception below.
Accept long passwords and refuse breached ones
ACC-13When you offer passwords, refuse any password on a list of breached and common passwords. Require at least 15 characters when the password is the only factor and 8 with a second factor, and allow at least 64. Set no rules on character types, never force changes on a schedule, and allow paste.
Hold every sign-in path to the same checks
ACC-65Keep a written list of every route that creates a session or issues a token. Each one calls one shared sign-in function that checks the second factor, the guessing limits and the account state.
Make sign-in and reset links single-use and short-lived
ACC-69A link that signs someone in or resets a password works once, expires within an hour, and holds a long random token. Build it from your own configured address, never the request's
Hostheader. A sign-in code expires within 15 minutes.
Recommended
Decide whether a provider or a library runs sign-in
ACC-6Choose a hosted identity provider or a maintained library on purpose, write down why, and never write your own password, token or protocol code.
Keep your own user ID
ACC-7Give every person your own stable user ID and map each sign-in method to it. Never key records by an email address or a provider's user ID.
Offer passkeys first
ACC-8Offer passkeys as the main way to sign in, through autofill. Invite people to create one right after they sign in another way.
Let people sign in with an account they already have
ACC-11Run sign-in with Google, Apple, GitHub or Microsoft through OpenID Connect, using the authorization code flow with PKCE,
stateandnonce, and a maintained library.Weigh email links before making them the only way in
ACC-14Use email links or codes as the only sign-in for low-risk accounts only. Bind each link to the browser that asked for it, and offer a passkey after the first sign-in.
Let people run an account on passkeys alone
ACC-71Let people sign up with a passkey and no password, and let others remove their password. Allow it only while the account keeps a synced passkey or two passkeys, and a recovery path.
Never remove the last way to sign in
ACC-16Let people add and remove sign-in methods, but refuse to remove the last one.
Give the same answer for known and unknown accounts
ACC-79Login, sign-up and password reset must answer the same way whether or not the account exists, so nobody can find out who has an account.
Optional
Keep the password manager's passkey list current
ACC-10Tell the browser when a passkey stops working or a user's name changes, with the WebAuthn signal methods, so people stop picking dead passkeys.
Sign in devices without a keyboard through a second screen
ACC-15For TVs, command-line tools and other devices without a handy browser, use the OAuth 2.0 Device Authorization Grant from RFC 8628. Never ask for a password on the device.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/accounts/sign-in-methods">Agent Wranglers accounts and identity playbook</a>. In code you write, add a comment next to it with the same link.