The end-user auth API is what the Scute SDKs call from the browser and from your server. Every path starts with /v1/auth/:app_id, where :app_id is the app's UUID or its app_xxx public ID.
Credentials#
| Credential | Header | Used by |
|---|---|---|
| None | Starting a sign-in (magic link, code, passkey, OAuth, SAML), the JWKS, password reset | |
| Access token | X-Authorization: Bearer <access> | The signed-in person's own data: profile, sessions, devices, MFA |
| Refresh token | X-Refresh-Token: <refresh> | Getting a new access token |
| App key | Authorization: Bearer scapp_... | Server-side token rotation (rotate_access, force_refresh) |
| Setup token | X-Scute-Setup-Token: <setup_token> | Adding a second factor or a contact in the middle of a sign-in |
Keep the app key on your server. See Authentication for every credential the API accepts.
Sign-in flow#
Start
Send the identifier to a start route: magic links, one-time codes, passkeys, OAuth providers or SAML SSO.
Finish the first factor
The person opens the link, types the code or completes the passkey ceremony. The finishing route returns a token set, or the next step the sign-in owes.
Finish any remaining steps
When the response carries mfa_required, contact_verification_required or verification_required, the sign-in is not done yet. See Sign-in steps.
Keep the session alive
Send the access token on calls, and swap the refresh token for a new access token before it expires. See Tokens.
Token set#
Every route that completes a sign-in returns the same object.
{ "csrf": "kZQ3x0Qb7V1o2y8wL4mN9pR6sT0uV3wX5yZ7aB9cD1eF", "access": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiJ9...", "access_expires_at": "2026-11-19T15:04:05.000+00:00", "refresh": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiJ9...", "refresh_expires_at": "2026-11-26T14:04:05.000+00:00", "key_id": "f3b1c2d4e5", "user_id": "0193f900-aaaa-7bbb-8ccc-eeeeeeeeeeee"}| Field | Description |
|---|---|
| csrf | CSRF token for the session. Scute checks it in X-CSRF-Token only when a token is sent in a cookie. |
| access | Access token (JWT, RS256). Lifetime is the app's access expiration, 3600 seconds by default. |
| access_expires_at | When the access token expires. |
| refresh | Refresh token (JWT). Lifetime is the app's refresh expiration, 604800 seconds (7 days) by default. Left out when the app has refresh tokens in the response turned off. |
| refresh_expires_at | When the refresh token expires. Left out with refresh. |
| key_id | kid of the workspace key that signed the tokens. |
| user_id | The app user's ID. |
A sign-in may add these fields next to the tokens:
| Field | When |
|---|---|
| mfa_enrollment_suggested | true when the app asks the person to set up a second factor. |
| mfa_grace_days_remaining | Days left before a second factor is required. |
| mfa_factor_not_allowed | true when the person's factors are not ones the app allows. |
| available_methods | The second factors the person can set up. |
Sign-in refusals#
Every start and finish route checks the same rules before it sends anything or issues a session.
| Status | error_code | Reason |
|---|---|---|
| 400 | invalid_identifier | The email or phone is not valid. |
| 403 | ip_blocked | The workspace's IP rules block the caller's address. |
| 403 | country_blocked | The workspace's IP rules block the caller's country. |
| 403 | sso_required | The email's domain is verified for SAML with SSO enforced. details.sso_login_url has the SSO start URL. |
| 403 | signup_disabled | Public sign-up is off and the identifier has no account in this app. |
| 403 | account_deactivated | The person was deactivated. |
| 403 | user_banned | The person is banned. |
| 403 | user_suspended | The person is suspended. |
| 403 | security_block | Attack protection refused the sign-in. |
| 403 | sign_in_method_disabled | The app has this way of signing in turned off. details.method names it. |
| 422 | incomplete_user_info | Required user fields are missing. details.required_fields lists them. |
When sign-up is closed, the magic link and code start routes answer an identifier that has no account with the same 200 a known identifier gets, so the answer does not reveal which accounts exist.