Sign-up, sign-in (with optional or required two-factor step), email verification, password reset
and Google sign-in. All of these are public; successful sign-in returns a session token (JWT) that
is valid for 7 days and is sent as Authorization: Bearer <token>.
List available sign-in methods
Public. Which sign-in options a login / sign-up page should show.
List available sign-in methods › Responses
Enabled methods.
email_passwordEmail/password sign-in is enabled.
registrationNew accounts can sign up.
googleGoogle sign-in is configured and enabled.
turnstile_site_keyCloudflare Turnstile site key when the security check is on; then send turnstile_token on login, register, resend-verification and forgot-password.
Sign up with email and password
Creates a (non-admin) account. Requires email/password sign-up to be enabled (403 otherwise)
and the instance to be set up. Limited to 5 attempts per IP per minute. The operator may block
disposable domains, certain domains and + aliases (400), and may require a Cloudflare Turnstile
token (see GET /api/auth/methods).
- When email verification is required, the response is
{"verification_required": true, "email": …}and a link plus a 6-digit code are emailed; continue withPOST /api/auth/verify-email. The same response is returned if the address is already registered, so the form reveals nothing. - Otherwise the response is
{"token": …}— a session token; the user is signed in.
Sign up with email and password › Request Body
emailpasswordnameturnstile_tokenCloudflare Turnstile response; required when turnstile_site_key is set.
referral_codeAffiliate code from a ?ref= sign-up link (8 characters). Invalid codes are ignored.
Sign up with email and password › Responses
Signed in, or verification required.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: token | |
| type = object · requires: verification_required, email |
tokenSession token (JWT, valid 7 days). Send as Authorization: Bearer <token>.
Sign in with email and password
Checks the password and returns one of three shapes:
{"token": "<jwt>"}— signed in. SendAuthorization: Bearer <jwt>on Dashboard requests. Sessions last 7 days and end early when the password is changed, 2FA is turned on or off, or the account is suspended.{"verification_required": true, "email": "…"}— the email isn't verified yet (only shown after a correct password). Continue withPOST /api/auth/verify-emailorPOST /api/auth/resend-verification.{"mfa": {"token": "<mfa_token>", "setup": <bool>}}— a second factor is needed (always for admins, and for users who turned 2FA on). The challenge is valid for 10 minutes and allows 5 wrong codes.setup: false→ ask for a 6-digit authenticator code (or a recovery code) and callPOST /api/auth/mfa/verifywith{mfa_token, code}; it returns{"token": …}.setup: true(an admin without 2FA) → callPOST /api/auth/mfa/setupwith{mfa_token}to get the secret / QR code, thenPOST /api/auth/mfa/verifywith the first code; it returns{"token": …, "recovery_codes": [...]}.
Wrong email and wrong password both return 401 "wrong email or password". Limited to 30 attempts
per IP and 10 per email per minute. A Turnstile token is required when enabled.
Sign in with email and password › Request Body
emailpasswordturnstile_tokenSign in with email and password › Responses
A session, a verification hint or an MFA challenge.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: token | |
| type = object · requires: verification_required, email | |
| type = object · requires: mfa |
tokenSession token (JWT, valid 7 days). Send as Authorization: Bearer <token>.
Get the 2FA secret during sign-in enrolment
For an MFA challenge with setup: true. Returns a new TOTP secret as text, otpauth:// URI and
SVG QR code. Repeated calls during the same sign-in return the same secret. Finish with
POST /api/auth/mfa/verify.
Get the 2FA secret during sign-in enrolment › Request Body
mfa_tokenThe mfa.token from sign-in (43 characters).
Get the 2FA secret during sign-in enrolment › Responses
Enrolment details.
secretBase32 secret in groups of 4 characters, for manual entry.
otpauth_uriotpauth://totp/… URI.
qr_svgSVG markup of the QR code for otpauth_uri.
accountThe user's email.
issuerThe site name.
Complete sign-in with a 2FA code
Second sign-in step. code is a 6-digit TOTP code, or (when not enrolling) a single-use recovery
code. When the challenge had setup: true, this also turns 2FA on and returns the recovery codes
once. After 5 wrong codes the challenge ends and the user must sign in again. Limited to 10
attempts per user per minute.
Complete sign-in with a 2FA code › Request Body
mfa_tokencode6-digit code, or a recovery code.
Complete sign-in with a 2FA code › Responses
Signed in.
tokenSession token (JWT).
recovery_codesOnly after enrolment (setup: true). Show them once; they are not retrievable.
Verify an email address
Confirms the address with either the token from the emailed link (the link carries it in the URL
fragment: '/verify-email#token=…) or the email plus the 6-digit code from the email. Links are'
valid for 24 hours; a code dies after 5 wrong guesses. Limited to 20 attempts per IP per minute.
Users without 2FA are signed in (token is included). Admins and users with 2FA get only
{"verified": true} and then sign in normally.
Verify an email address › Request Body
tokenToken from the emailed link.
emailcode6-digit code from the email; use together with email.
Verify an email address › Responses
Verified.
verifiedtokenSession token; absent for admins and users with 2FA.
Resend the verification email
Sends a fresh verification link and code (earlier ones stop working) if the address belongs to an
unverified, active account. Always answers {"ok": true} so it reveals nothing about which
addresses exist. Limited to 5 per IP and 2 per address per minute; Turnstile token when enabled.
Resend the verification email › Request Body
emailturnstile_tokenCloudflare Turnstile response, when enabled.
Resend the verification email › Responses
Done.
okRequest a password reset email
Emails a reset link (/reset-password#token=…, valid for 1 hour) if the address belongs to an
active account. Always answers {"ok": true}. Returns 403 when the instance has no working
email. Same rate limits and Turnstile rule as resend-verification.
Request a password reset email › Request Body
emailturnstile_tokenCloudflare Turnstile response, when enabled.
Request a password reset email › Responses
Done.
okSet a new password from a reset link
Sets the new password using the token from the reset link. Does not sign in; all existing sessions end and the user signs in with the new password. Also marks the email as verified. Minimum 8 characters (10 for admins). Limited to 10 attempts per IP per minute.
Set a new password from a reset link › Request Body
tokenpasswordSet a new password from a reset link › Responses
Done.
okStart Google sign-in
Browser navigation endpoint (not for fetch). Redirects to Google's consent screen (OAuth 2.0
authorization code + PKCE). The flow must be finished within 10 minutes. Google then returns to
GET /api/auth/google/callback.
query Parameters
refAffiliate referral code, kept across the redirect so a new account is attributed.
Start Google sign-in › Responses
Redirect to Google.
Google sign-in callback
Called by Google, not by your code. Always redirects back to the site's public URL:
/auth/callback#token=<jwt>— signed in (the token is in the URL fragment, never sent to servers)./auth/callback#mfa=<mfa_token>&setup=<true|false>— continue with the two-factor step (seePOST /api/auth/login)./login?error=<code>— failure;codeis one ofgoogle_cancelled,google_failed,google_disabled,google_expired,google_unverified,account_disabled,signup_disabled,email_not_allowed.
An existing account with the same (Google-verified) email is linked; otherwise a new account is created when registration is enabled.
query Parameters
codestateerrorGoogle sign-in callback › Responses
Redirect back to the dashboard.