/v1/apps/{app_id}/auth-configAuthGet the per-app auth config (signup, signin, password policy, sessions).
Path parameters
app_id*stringId of the app.
Response · 200
signup_enabled*booleanWhether new users can sign up.
signup_requires_pak*booleanWhen true, sign-up requires a Platform API Key from this app's workspace (anonymous sign-ups get 401).
signin_enabled*booleanWhether existing users can sign in.
signup_allowed_email_domains*arrayEmail domains allowed to sign up; empty means any domain.
signup_default_role*stringRole newly signed-up users receive.
Example: "member"
session_duration_minutes*numberSession lifetime in minutes.
Example: 10080
access_token_minutes*numberAccess-token lifetime in minutes (5-60).
Example: 60
max_failed_login_attempts*numberConsecutive failed sign-ins before an account is locked for 15 minutes.
Example: 5
password_min_length*numberMinimum password length.
Example: 12
password_require_uppercase*booleanWhether passwords need an uppercase letter.
password_require_number*booleanWhether passwords need a digit.
password_require_symbol*booleanWhether passwords need a symbol.
max_sessions*numberMaximum concurrent sessions per user; a sign-in past it ends the oldest session.
Example: null
enforce_app_permissions*booleanWhether routes that declare an app permission enforce it against the user's role.
oauth_link_policy*objectWhat a federated sign-in does when its verified email already belongs to an account in the app: `auto` links it, `confirm` asks the user to prove the existing account first, `reject` refuses the sign-in.
allowed_redirect_origins*arrayOrigins the OAuth web flow may redirect back to (`return_to`), exact match.
password_breach_check*objectBreached-password check on sign-up and password changes: `block`, `warn` or `off`.
Example: "block"
mfa*objectWhether every user must hold an MFA factor: `optional` or `required`.
Example: "optional"
mfa_grace_days*numberDays after account creation during which `mfa: required` still mints ordinary tokens.
Example: 0
unverified_account_ttl_days*numberDays an account may keep an unverified primary email before it is deleted. null = never.
Example: 7
bot_protection*objectSign-up bot protection; null when not configured.
passwordless_email*objectEmail sign-in (magic link / code); null when never configured.
test_mode*objectTest mode; null when never configured.
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/auth-config
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const authConfig = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").authConfig.retrieve();auth.admin.app(…).authConfig.retrieve(options?): Auth.AuthConfig
Response
{
"signup_enabled": false,
"signup_requires_pak": false,
"signin_enabled": false,
"signup_allowed_email_domains": [
"string"
],
"signup_default_role": "member",
"session_duration_minutes": 10080,
"access_token_minutes": 60,
"max_failed_login_attempts": 5,
"password_min_length": 12,
"password_require_uppercase": false,
"password_require_number": false,
"password_require_symbol": false,
"max_sessions": null,
"enforce_app_permissions": false,
"oauth_link_policy": {},
"allowed_redirect_origins": [
"string"
],
"password_breach_check": "block",
"mfa": "optional",
"mfa_grace_days": 0,
"unverified_account_ttl_days": 7,
"bot_protection": {},
"passwordless_email": {},
"test_mode": {}
}