Most settings are fields of the app, changed with Update an app. Attack protection has its own routes, below.
Sign-in settings#
| Field | Type | Default | Meaning |
|---|---|---|---|
| name | string | App name, up to 80 characters. | |
| origin | string | The app's URL. Sign-in links and redirects go to it. | |
| additional_origins | string[] | [] | Other URLs the app runs on. |
| login_url | string | / | Path of the sign-in page on origin. |
| callback_url | string | /callback | Path on origin that sign-in links and OAuth and SAML redirects return to. Starts with /; no ? or #. |
| identifier_email | boolean | true | Users can sign in with an email. |
| identifier_phone | boolean | false | Users can sign in with a phone. |
| email_required | boolean | false | Ask the user for a confirmed email. |
| phone_number_required | boolean | false | Ask the user for a confirmed phone. |
| public_signup | boolean | true | New users can sign up. Sign up also needs the workspace open; signup_open on the app says whether both are. |
| passkeys_enabled | boolean | true | Users can sign in with passkeys. |
| email_auth_type | string | magic | What an email sign-in sends: magic (a magic link) or otp (a code). |
| magic_link_expiration | integer | Seconds a magic link lasts: 60 to 604800. | |
| otp_expiration | integer | 600 | Seconds a one-time code lasts: 1 to 604800. |
| otp_length | integer | 6 | Digits in a one-time code. |
| sms_magic_link_mode | string | direct_auth | What a magic link sent by SMS does: direct_auth signs in on the web sign-in page, deep_link opens the mobile app at sms_magic_link_app_url. |
| sms_magic_link_app_url | string | Where deep_link opens. | |
| sms_country_allowlist_enabled | boolean | false | Send SMS only to the countries in sms_country_allowlist. |
| sms_country_allowlist | string[] | [] | Country codes SMS may go to. |
| test_identities | boolean | false | Allow test identities. Only in a sandbox workspace. |
| platform, framework | string | What the app is built for, as you describe it. |
A change that would leave no way to sign in (no email, no phone, no passkeys and no enabled OAuth provider) is refused with 422.
Sessions#
| Field | Type | Default | Meaning |
|---|---|---|---|
| access_expiration | integer | 3600 | Seconds an access token lasts: 1 to 34560000 (400 days). |
| refresh_expiration | integer | 604800 | Seconds a session (its refresh token) lasts: 1 to 34560000. |
| session_timeout | integer | 604800 | Idle timeout in seconds: 300 to 34560000. A session not used or refreshed for this long cannot be refreshed. |
| refresh_payload | boolean | true | Return the refresh token in sign-in responses. When false, the refresh token is left out. |
| auto_refresh | boolean | true | The SDKs refresh the access token before it expires. |
MFA#
| Field | Type | Default | Meaning |
|---|---|---|---|
| mfa_policy | string | disabled | disabled, optional or required. |
| mfa_methods_allowed | string[] | ["totp", "sms", "email", "backup_codes"] | Methods users may set up. Values: totp, sms, email, webauthn, push, backup_codes. |
| mfa_grace_period_days | integer | 7 | When MFA is required, days after a user is created during which they may still sign in without it. |
| mfa_reverify_minutes | integer | 10 | Minutes a recent check of the user counts before they change their MFA methods: 5 to 60. |
| webauthn_skip_mfa | boolean | true | A passkey sign-in skips the MFA step. |
Email#
| Field | Type | Meaning |
|---|---|---|
| email_primary_color | string | Button and accent color in emails. Returned as primary_color too. |
| email_logo_url | string | Logo in emails, when no logo is uploaded. |
| email_footer_text | string | Footer text in emails. |
Get attack protection#
GET
/v1/apps/:app_id/attack_protectionApp key + M2MAttack protection controls the checks Scute runs on each sign-in. These routes take the app key in Authorization and an M2M token in X-Authorization. Changing settings with an M2M token needs its write scope. See Authentication.
cURLbash
curl https://api.scute.io/v1/apps/$SCUTE_APP_ID/attack_protection \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"Response 200json
{ "attack_protection": { "security_level": "medium", "notify_on_new_device": true, "notify_on_new_ip": false, "notify_on_country_change": true, "require_verification_new_device": false, "require_verification_suspicious": true, "limit_blocked_notice_daily": true, "device_trust_enabled": true, "max_login_distance_km": 500, "suspicious_distance_time_hours": 2, "device_trust_days": 30 }}The values above are the defaults.
| Field | Meaning |
|---|---|
| security_level | How strict the sign-in checks are: off, low, medium, high or paranoid. |
| notify_on_new_device | Email the user after a sign-in from a new device. |
| notify_on_new_ip | Email the user after a sign-in from a new IP address. |
| notify_on_country_change | Email the user after a sign-in from a new country. |
| require_verification_new_device | Ask for a second step on a new device. |
| require_verification_suspicious | Ask for a second step on a suspicious sign-in. |
| limit_blocked_notice_daily | Send the "sign-in blocked" notice to a user at most once a day. |
| device_trust_enabled | Users may trust a device after a sign-in with a second factor. A trusted device skips the "device not trusted" check. |
| device_trust_days | Days a device stays trusted: 1 to 365. |
| max_login_distance_km | Distance between two sign-ins that counts as impossible travel: 50 to 10000. |
| suspicious_distance_time_hours | The time window for that distance: 1 to 48. |
Update attack protection#
PATCH
/v1/apps/:app_id/attack_protectionApp key + M2MSend any of the fields inside attack_protection. Booleans must be true or false (or the strings "true" and "false"). Returns 200 with the full settings.
cURLbash
curl -X PATCH https://api.scute.io/v1/apps/$SCUTE_APP_ID/attack_protection \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "attack_protection": { "security_level": "high", "notify_on_new_ip": true } }'| Status | Error | When |
|---|---|---|
| 404 | app_not_found | No app with that id. |
| 422 | attack_protection_required | No attack_protection object. |
| 422 | unknown_setting | A field that is not in the list. |
| 422 | invalid_setting | A value is out of range or of the wrong type. |