Sign-in & auth controls how users enter the platform: sign-in and registration methods, email verification, Turnstile human verification, OIDC / OAuth2 identity providers, and sign-in security policy.
Where to find it#
Open Admin console → Sign-in & auth. The page is split into five groups, and each group has its own Save button:
- Sign-in page
- Sign-in & registration
- Human verification
- Binding & verification
- Sign-in security
The OIDC / OAuth2 identity providers table appears inside Sign-in & registration when Third-party login is on.
Changes take effect on the next sign-in or registration attempt. Make sure at least one administrator can still sign in before you disable a method.
Control sign-in and registration methods#
- Open Sign-in & registration.
- Switch the methods you want.
- Click Save.
| Switch | What it does |
|---|---|
| Email login | Allow users to sign in with email and password. |
| Username login | Allow users to sign in with username and password. |
| Email registration | Allow users to create accounts with email. |
| Password reset | Allow users to reset passwords from the sign-in page. Requires email verification. |
| Third-party login | Enable and show configured OIDC / OAuth2 identity providers. |
The switches depend on each other:
- Email registration can be on only when Email login is on. Turning Email login off also turns off Email registration and Registration human check.
- Password reset can be on only when Email verification is on. Turning Email verification off also turns off Password reset.
- You cannot turn off both Username login and Email login unless Third-party login is on and an administrator has a linked identity provider. Otherwise the switch is rejected with Cannot disable sign-in method.
Set the default redirect path#
- Open Sign-in page.
- Enter a path in Default redirect path.
- Click Save.
The value is used when a user opens /login without a next parameter. It must be an internal path that starts with a single /, for example /chat. A value such as https://example.com or //example.com is rejected with The default redirect path must be an internal path, for example /chat.
Configure email verification and SMTP#
- Open Binding & verification.
- Turn on Email verification. The SMTP fields appear.
- Fill in SMTP host, SMTP port, SMTP username, and SMTP password.
- Optionally set Sender.
- Click Save.
| Field | Notes |
|---|---|
| SMTP host | Server address used to send registration verification codes. |
| SMTP port | Server port, commonly 465 or 587. Must be an integer from 1 to 65535. |
| SMTP username | Login account, usually a full email address. |
| SMTP password | Login password or application-specific password. It is hidden after saving. |
| Sender | Sender shown in verification emails. Leave empty to use the SMTP username. |
While Email verification is on, saving fails if any required SMTP field is empty, or if the port is out of range:
- Email verification requires SMTP host, SMTP port, SMTP username, SMTP password.
- SMTP port must be an integer between 1 and 65535.
Registration email policy#
| Field | Behavior |
|---|---|
| Registration domain allowlist | Allowed email domains. Leave empty to allow all domains. Enter one domain per line. |
| Block plus aliases | Block registration with + alias addresses. |
| Auto-link same email | Link a third-party sign-in to an existing local account only when the third-party email matches and the provider's email verification field, email_verified by default, is true. |
Enable human verification#
Registration human verification uses Cloudflare Turnstile. It applies only to email registration; OIDC / OAuth2 sign-in is not affected.
- Turn on Email registration and save it first.
- Open Human verification.
- Turn on Registration human check.
- Enter the Turnstile Site Key and Turnstile Secret Key.
- Click Save.
The Secret Key is hidden after saving; leave it empty to keep the stored value. Saving fails when the prerequisites are not met:
- Enable email registration before enabling Turnstile verification.
- Turnstile verification requires Turnstile Site Key, Turnstile Secret Key.
Account and password rules#
These rules are enforced by the platform when a user registers, resets a password, or an administrator creates an account. They are not editable on this page.
| Item | Rule |
|---|---|
| Password length | 8 to 128 characters. |
| Password content | Cannot be digits only. |
| Username length | 3 to 16 characters. |
| Username content | Lowercase letters, digits, _, and -; must start and end with a letter or digit; cannot contain @. |
| Reserved usernames | Words such as admin, root, system, support, and settings are rejected. |
Add an OIDC / OAuth2 identity provider#
- In Sign-in & registration, turn on Third-party login and click Save.
- Click Add identity provider.
- Pick a preset (Apple, GitHub, Google, Discord, Facebook, Hugging Face, Linux Do, Microsoft, Twitter (X), Vercel) or Custom OIDC / Custom OAuth2.
- Fill in the fields and, for OIDC, choose Issuer URL or Discovery URL.
- Copy the callback URL and paste it into the provider's console.
- Set Scopes and, if needed, the field mapping under Advanced settings.
- Click Save.
Callback URL#
The dialog shows the callback URL that the provider must allow. When the platform exposes a server callback bridge, the primary field is Server callback URL (recommended) in the form <base>/<provider-slug>/callback, and a Legacy Web callback URL (deprecated soon) in the form <origin>/auth/callback?provider=<provider-slug> is also shown. Otherwise only the legacy URL is shown, labeled Callback URL. Use Copy URL to copy it.
Provider fields#
| Field | Notes |
|---|---|
| Type | OIDC or OAuth2. Required. |
| Name | Display name. Required. The slug used in the callback URL is derived from the name unless a slug already exists. |
| Login control | Allow platform sign-in. Default on. |
| Registration control | Allow automatic account creation. Only available when Login control is on. |
| Logo URL | Optional image shown next to the provider. |
| Client ID | Client identifier from the provider. Required. |
| Client Secret | Client secret from the provider. Required when creating; hidden after saving, so leave it empty while editing to keep the existing secret. |
| OIDC endpoint | For OIDC: Issuer URL or Discovery URL. Required. |
| Auth URL / Token URL / UserInfo URL | For OAuth2. All three are required. |
| Scopes | Requested scopes. Custom OIDC defaults to openid profile email; custom OAuth2 defaults to profile email. |
| Source field → System field | Maps provider response fields to User ID, Email, Email verified, Display name, and Avatar. Defaults are sub, email, email_verified, name, and picture. |
Manage providers#
The provider table lists Name, Type, Sign-in, Registration, and Client ID.
- Toggle Sign-in and Registration directly in the table. Registration cannot be turned on unless Sign-in is on; otherwise you see Enable sign-in first.
- Drag the handle to reorder providers. The order is saved automatically.
- Click a provider name or the pencil icon to edit it. Click the trash icon to delete it.
- Deleting a provider unlinks all accounts that use it. If some accounts rely only on that provider, the platform shows Force delete identity provider. After a force delete, those accounts can no longer sign in through it. Confirm those users have a password or another provider first.
Set sign-in security#
- Open Sign-in security.
- Set the values you need.
- Click Save.
| Field | Default | Notes |
|---|---|---|
| Access token lifetime | 24 | Access Token lifetime in hours. Range 1–168. |
| Keep signed in | 720 | Refresh Token and session lifetime in hours. Range 1–8760. |
| Failure lock threshold | 5 | Lock an account after this many consecutive failed sign-in attempts. Set 0 to disable account locking. |
| Lock duration | 15 | Lock duration in minutes. Set 0 to disable account locking. |
| Platform rate limit | Off | When on, the platform returns HTTP 429. Turn it off when Traefik, a gateway, or another outer layer handles rate limiting. |
| User API rate limit | 60 | Base per-minute request limit for signed-in user APIs. No effect when platform rate limiting is off. |
| Public auth rate limit | 30 | Base per-minute request limit for public login, registration, and token refresh APIs. No effect when platform rate limiting is off. |
Review security events#
Sign-in, two-factor, password, and other security events are recorded in the admin logs.
- Open Admin console → Logs.
- Select the Auth security tab.
- Use the search box, the Result filter, and the sort menu to narrow the list.
- Click a row to open Auth log detail.
| Column | Meaning |
|---|---|
| ID | Event record ID. |
| User | Display name, username, or user ID of the actor. |
| Event | Event type. |
| Result | Success, Failed, or Blocked. |
| Reason | Reason for the result, when provided. |
| IP | Client IP address. |
| Time | When the event occurred. |
| Request ID | Request correlation ID. |
Search matches user ID or event type. Sorting supports occurred time (newest or oldest) and ID (newest or oldest). The Clean up logs action can delete auth security history by cutoff date; active sessions and credentials are not changed.
Setting key reference#
All keys belong to the auth namespace.
| Group | Setting keys |
|---|---|
| Sign-in page | auth.login_default_next_path |
| Sign-in & registration | auth.email_login_enabled, auth.username_login_enabled, auth.email_registration_enabled, auth.password_reset_enabled, auth.third_party_login_enabled |
| Human verification | auth.turnstile_registration_enabled, auth.turnstile_site_key, auth.turnstile_secret_key |
| Binding & verification | auth.email_verification_enabled, auth.smtp_host, auth.smtp_port, auth.smtp_username, auth.smtp_password, auth.smtp_from, auth.email_registration_allowed_domains, auth.email_registration_block_plus_alias, auth.auto_link_verified_email |
| Sign-in security | auth.token_ttl_hours, auth.refresh_token_ttl_hours, auth.login_max_failures, auth.login_lock_minutes, auth.rate_limit_enabled, auth.rate_limit_rpm, auth.public_auth_rate_limit_rpm |
OIDC / OAuth2 providers are stored as individual provider records, not as auth.* keys. Each record carries its own login and registration control.
Troubleshooting#
- Save fails with a redirect path error. The value must be an internal path such as
/chat. Remove the scheme and host. - A login method switch is rejected. Third-party-only sign-in requires an administrator with a linked identity provider. Link one first, then disable username and email login.
- Email verification will not save. Fill in SMTP host, port, username, and password, and use a port between 1 and 65535.
- Turnstile will not save. Turn on Email registration first, then fill in both the Site Key and Secret Key.
- Third-party sign-in redirects back with an error. The callback URL registered at the provider must match the URL shown in the provider dialog exactly, including the slug.
- Session expired toast while saving. Sign in again; the admin session ended before the change was written.