Replace the environment's end-user auth settings
PUT /v1/user_management/settings: Replace the environment's end-user auth settings.
PUT /
- Scope
users:write- Auth
- Secret key (
sk_…) - Since
- 1.0
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Request body
Section titled “Request body”app_namestring or nullmax length 100
methodsarray of string Requiredmin items 1
password_min_lengthinteger Requiredmin 8 · max 64
password_historyinteger Requiredmin 0 · max 24
password_check_breachedboolean Required
Passwords must contain at least one uppercase letter, one lowercase letter, one number and one symbol (any character that is not a letter or digit; Unicode-aware, and a letter of a script without case counts as both upper and lower case). On by default for every environment (D191). A password that lacks one is refused withpassword_require_character_typesbooleanpassword_invalid,param: passwordand onedetailsitem per missing type (problem:missing_uppercase,missing_lowercase,missing_numberormissing_symbol). Omitted on update means true.default
true
Email codes and reset links work only in the browser that asked for them.bind_browserboolean Requiredmfa_policystring Requiredone of
off,optional,required
Whether a social sign-in may join an existing user, and only on an email the provider asserts is verified.linking_rulestring Requiredone of
verified_email,neversession_absolute_secondsinteger Requiredmin 300 · max 7776000
session_idle_secondsinteger Requiredmin 300 · max 7776000
Sign-up on the hosted pages asks for a first and last name. Absent reads as false.require_nameboolean
Native apps whose passkey ceremonies are accepted on the hosted sign-in relying party, as android:apk-key-hash:<base64url SHA-256 of the signing certificate> or ios:<team id>.<bundle id>. Absent reads as none.native_app_originsarray of stringmax items 20
Android package names for the sign-in host’s /.well-known/assetlinks.json (passkeys and sign-in credentials shared with the app). Each apk_key_hash must also be listed in native_app_origins as android:apk-key-hash:<hash>. Absent reads as none.android_appsarray of AndroidAppLinkmax items 20
Responses
Section titled “Responses”- 200 OK UserManagementSettings
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 401 Codes: authentication_required, api_key_invalid. Error
- 403 Codes: api_key_scope_missing, ip_not_allowed, plan_limit_reached. Error
- 404 Code: resource_not_found (also returned for other tenants’ IDs); a path no endpoint serves answers route_not_found. A browser GET or HEAD of an unknown path whose Accept ranks text/html above JSON gets an HTML 404 page instead, with the same status; every other client gets this JSON body. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X PUT \ "https://api.ohauthcat.com/v1/user_management/settings" \ -H "Authorization: Bearer $OHAUTHCAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "methods": [ "password" ], "password_min_length": 8, "password_history": 0, "password_check_breached": true, "bind_browser": true, "mfa_policy": "off", "linking_rule": "verified_email", "session_absolute_seconds": 300, "session_idle_seconds": 300}'const response = await fetch("https://api.ohauthcat.com/v1/user_management/settings", { method: "PUT", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "methods": [ "password" ], "password_min_length": 8, "password_history": 0, "password_check_breached": true, "bind_browser": true, "mfa_policy": "off", "linking_rule": "verified_email", "session_absolute_seconds": 300, "session_idle_seconds": 300 }),});const data = await response.json();import osimport requests
response = requests.put( "https://api.ohauthcat.com/v1/user_management/settings", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "methods": [ "password", ], "password_min_length": 8, "password_history": 0, "password_check_breached": True, "bind_browser": True, "mfa_policy": "off", "linking_rule": "verified_email", "session_absolute_seconds": 300, "session_idle_seconds": 300, },)data = response.json(){ "app_name": "example_app_name", "methods": [ "password" ], "password_min_length": 8, "password_history": 0, "password_check_breached": true, "password_require_character_types": true, "bind_browser": true, "mfa_policy": "off", "linking_rule": "verified_email", "session_absolute_seconds": 300, "session_idle_seconds": 300, "require_name": true, "native_app_origins": [ "example_native_app_origin" ], "android_apps": [ { "package_name": "example_package_name", "apk_key_hash": "example_apk_key_hash" } ]}