@faable/auth-sdk 2.9.30 → 2.9.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8704,6 +8704,10 @@ export interface components {
8704
8704
  * - `invalid_credentials` (400): The email/username or password is incorrect.
8705
8705
  * - `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.
8706
8706
  * - `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.
8707
+ * - `challenge_required` (428): The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.
8708
+ * - `challenge_invalid` (428): The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.
8709
+ * - `challenge_unsupported` (403): The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.
8710
+ * - `origin_required` (403): This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.
8707
8711
  * - `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.
8708
8712
  * - `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.
8709
8713
  * - `signup_disabled` (403): Self-service sign-up is disabled on this connection.
@@ -8833,7 +8837,7 @@ export interface components {
8833
8837
  * - `invalid_code_verifier` (400): `code_verifier` does not match the `code_challenge` of the handoff.
8834
8838
  * @enum {string}
8835
8839
  */
8836
- ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "last_sign_in_method" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "email_sender_domain_not_allowed" | "plan_required" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "username_taken" | "invalid_username" | "invalid_email" | "invalid_name" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "no_database_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "invalid_saml_request" | "saml_sp_mismatch" | "saml_not_enabled" | "invalid_client_jwks" | "client_jwks_required" | "invalid_saml_sp" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "reauth_required" | "invalid_current_password" | "email_not_verified" | "invalid_profile_field" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invalid_invite_url" | "invite_email_mismatch" | "invite_email_unverified" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "consent_options_unavailable" | "consent_choice_invalid" | "oauth21_required" | "registration_disabled" | "invalid_email_domain" | "public_email_domain" | "organization_domain_not_found" | "organization_domain_taken" | "organization_domain_unverified" | "plan_unavailable" | "organization_domain_mismatch" | "team_not_in_organization" | "organization_has_no_idp" | "organization_not_found" | "invalid_user" | "not_an_organization_admin" | "last_organization_admin" | "team_id_unavailable" | "use_team_member_route" | "role_not_found" | "invalid_role" | "invalid_permission" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress" | "account_mismatch" | "connect_redirect_uri_missing" | "invalid_site_url" | "handoff_not_found" | "handoff_expired" | "handoff_used" | "invalid_code_verifier";
8840
+ ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "last_sign_in_method" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "email_sender_domain_not_allowed" | "plan_required" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "challenge_required" | "challenge_invalid" | "challenge_unsupported" | "origin_required" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "username_taken" | "invalid_username" | "invalid_email" | "invalid_name" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "no_database_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "invalid_saml_request" | "saml_sp_mismatch" | "saml_not_enabled" | "invalid_client_jwks" | "client_jwks_required" | "invalid_saml_sp" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "reauth_required" | "invalid_current_password" | "email_not_verified" | "invalid_profile_field" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invalid_invite_url" | "invite_email_mismatch" | "invite_email_unverified" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "consent_options_unavailable" | "consent_choice_invalid" | "oauth21_required" | "registration_disabled" | "invalid_email_domain" | "public_email_domain" | "organization_domain_not_found" | "organization_domain_taken" | "organization_domain_unverified" | "plan_unavailable" | "organization_domain_mismatch" | "team_not_in_organization" | "organization_has_no_idp" | "organization_not_found" | "invalid_user" | "not_an_organization_admin" | "last_organization_admin" | "team_id_unavailable" | "use_team_member_route" | "role_not_found" | "invalid_role" | "invalid_permission" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress" | "account_mismatch" | "connect_redirect_uri_missing" | "invalid_site_url" | "handoff_not_found" | "handoff_expired" | "handoff_used" | "invalid_code_verifier";
8837
8841
  /** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
8838
8842
  ErrorResponse: {
8839
8843
  /** @description The HTTP status, repeated. */
@@ -34225,6 +34229,11 @@ export interface operations {
34225
34229
  resume_url?: string;
34226
34230
  /** @description The login's key from `/authorize` — the hosted screen's `?state=`. Only ties the code this start issues to that login for tracing; it is not consumed and never rejects the request (`/passwordless/verify_code` is the step that uses it). */
34227
34231
  state?: string;
34232
+ /** @description Answer to a `challenge_required`: the challenge `id` and the `nonce` found. @faable/auth-js >= 3.4.0 fills it in. */
34233
+ challenge?: {
34234
+ id: string;
34235
+ nonce: string;
34236
+ };
34228
34237
  };
34229
34238
  };
34230
34239
  };
@@ -34261,7 +34270,11 @@ export interface operations {
34261
34270
  };
34262
34271
  };
34263
34272
  /**
34264
- * @description `origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.
34273
+ * @description `challenge_unsupported` — The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.
34274
+ *
34275
+ * `origin_required` — This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.
34276
+ *
34277
+ * `origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.
34265
34278
  *
34266
34279
  * `signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.
34267
34280
  */
@@ -34272,7 +34285,7 @@ export interface operations {
34272
34285
  content: {
34273
34286
  "application/json": components["schemas"]["ErrorResponse"] & {
34274
34287
  /** @enum {string} */
34275
- error_code?: "origin_not_allowed" | "signup_denied";
34288
+ error_code?: "challenge_unsupported" | "origin_required" | "origin_not_allowed" | "signup_denied";
34276
34289
  };
34277
34290
  };
34278
34291
  };
@@ -34288,6 +34301,22 @@ export interface operations {
34288
34301
  };
34289
34302
  };
34290
34303
  };
34304
+ /**
34305
+ * @description `challenge_invalid` — The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.
34306
+ *
34307
+ * `challenge_required` — The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.
34308
+ */
34309
+ 428: {
34310
+ headers: {
34311
+ [name: string]: unknown;
34312
+ };
34313
+ content: {
34314
+ "application/json": components["schemas"]["ErrorResponse"] & {
34315
+ /** @enum {string} */
34316
+ error_code?: "challenge_invalid" | "challenge_required";
34317
+ };
34318
+ };
34319
+ };
34291
34320
  /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
34292
34321
  429: {
34293
34322
  headers: {
@@ -38465,6 +38494,11 @@ export interface operations {
38465
38494
  connection?: string;
38466
38495
  /** @description The application's Client ID. auth-js sends it. When it names a client of the tenant, that client's Allowed Web Origins and signup protection apply; an unknown or missing one is accepted (as before) and recorded. */
38467
38496
  client_id?: string;
38497
+ /** @description Answer to a `challenge_required`: the challenge `id` and the `nonce` found. @faable/auth-js >= 3.4.0 fills it in. */
38498
+ challenge?: {
38499
+ id: string;
38500
+ nonce: string;
38501
+ };
38468
38502
  };
38469
38503
  };
38470
38504
  };
@@ -38499,7 +38533,11 @@ export interface operations {
38499
38533
  };
38500
38534
  };
38501
38535
  /**
38502
- * @description `origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.
38536
+ * @description `challenge_unsupported` — The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.
38537
+ *
38538
+ * `origin_required` — This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.
38539
+ *
38540
+ * `origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.
38503
38541
  *
38504
38542
  * `signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.
38505
38543
  *
@@ -38512,7 +38550,7 @@ export interface operations {
38512
38550
  content: {
38513
38551
  "application/json": components["schemas"]["ErrorResponse"] & {
38514
38552
  /** @enum {string} */
38515
- error_code?: "origin_not_allowed" | "signup_denied" | "signup_disabled";
38553
+ error_code?: "challenge_unsupported" | "origin_required" | "origin_not_allowed" | "signup_denied" | "signup_disabled";
38516
38554
  };
38517
38555
  };
38518
38556
  };
@@ -38544,6 +38582,22 @@ export interface operations {
38544
38582
  };
38545
38583
  };
38546
38584
  };
38585
+ /**
38586
+ * @description `challenge_invalid` — The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.
38587
+ *
38588
+ * `challenge_required` — The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.
38589
+ */
38590
+ 428: {
38591
+ headers: {
38592
+ [name: string]: unknown;
38593
+ };
38594
+ content: {
38595
+ "application/json": components["schemas"]["ErrorResponse"] & {
38596
+ /** @enum {string} */
38597
+ error_code?: "challenge_invalid" | "challenge_required";
38598
+ };
38599
+ };
38600
+ };
38547
38601
  /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
38548
38602
  429: {
38549
38603
  headers: {
package/dist/version.js CHANGED
@@ -9,13 +9,13 @@
9
9
  // login pages could not import the SDK at all. Same pattern as auth-js.
10
10
  //
11
11
  // The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
12
- export const version = "2.9.30";
12
+ export const version = "2.9.31";
13
13
  // Short git SHA of the released commit. The version dates a build; this names
14
14
  // the exact tree, so a canonical log line or an audit entry leads straight to
15
15
  // `git show <sha>`. Deliberately NOT hex: an unreleased build (dev, a local
16
16
  // link) cannot be mistaken for a real commit — auth only records values that
17
17
  // look like a SHA, and this one never will.
18
- export const commit = "d2a36e7";
18
+ export const commit = "c54b5db";
19
19
  // What this SDK writes in `x-faable-client`. Exported for a consumer that
20
20
  // builds a strategy on its own (outside `FaableAuthApi`) and still wants the
21
21
  // token request attributed — a bare `authClientCredentials` stamps only what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.9.30",
3
+ "version": "2.9.31",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "2.108.0",
6
+ "version": "2.109.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -9959,7 +9959,7 @@
9959
9959
  },
9960
9960
  "ErrorCode": {
9961
9961
  "type": "string",
9962
- "description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `last_sign_in_method` (409): Unlinking this account would leave the user with no way to sign in: set a password, verify the email or link another account first.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (403): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `username_taken` (409): Another user of this database connection already uses that username.\n- `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): A client field was rejected: by dynamic client registration (RFC 7591), or on a client create/update (`initiate_login_uri`). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `invalid_saml_request` (400): The SAMLRequest is missing, too large, not well-formed or not a SAML 2.0 AuthnRequest.\n- `saml_sp_mismatch` (400): The AuthnRequest does not match the client's SAML configuration: its Issuer is not the configured entity_id, or it asks for another Assertion Consumer Service URL or binding.\n- `saml_not_enabled` (404): This client does not have SAML enabled.\n- `invalid_client_jwks` (400): The client `jwks` is not a valid set of public signing keys: RSA (2048 bits or more), EC (P-256, P-384, P-521) or Ed25519, public members only, up to 5, each with a `kid` when there is more than one.\n- `client_jwks_required` (400): A client whose `token_endpoint_auth_method` is `private_key_jwt` needs public keys in `jwks`.\n- `invalid_saml_sp` (400): The `saml_sp` configuration is invalid: `acs_url` must be an absolute https URL without a fragment.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `reauth_required` (403): The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.\n- `invalid_current_password` (400): The current password is wrong.\n- `email_not_verified` (403): The user's email is not verified, and the operation needs it to be.\n- `invalid_profile_field` (400): A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n- `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n- `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `consent_options_unavailable` (502): The consent screen could not load the choices from the API being authorized (its `consent_options.url`). Try again in a moment.\n- `consent_choice_invalid` (400): The choice sent with the consent decision is not one the API offered for this user.\n- `oauth21_required` (400): The tenant enforces OAuth 2.1 (`oauth21_enabled`) and the request is one OAuth 2.1 removed: a `response_type` other than `code`, an authorization request without PKCE (`code_challenge` with `S256`), or the password grant. `message` says which. Update the application (with `@faable/auth-js`, version 3.1.0 or later) or turn `oauth21_enabled` off for the tenant.\n- `registration_disabled` (403): Dynamic client registration is turned off for this tenant. Create the client from the dashboard or the Management API, or turn on `dynamic_client_registration_enabled`.\n- `invalid_email_domain` (400): Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.\n- `public_email_domain` (400): A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.\n- `organization_domain_not_found` (404): The organization has no such domain.\n- `organization_domain_taken` (409): Another organization of this tenant already verified this domain. A domain belongs to one organization.\n- `organization_domain_unverified` (400): The TXT record was not found or does not hold the expected value yet. `details.record` says what was expected and what resolves now; DNS can take a few minutes to propagate.\n- `plan_unavailable` (503): The plan could not be checked right now, and this setting is only for paid plans. Try again in a minute.\n- `organization_domain_mismatch` (403): This organization's identity provider can only sign in addresses of the organization's verified email domains.\n- `team_not_in_organization` (400): Auto-join can only put people in teams of the same organization. `details.teams` lists the others.\n- `organization_has_no_idp` (400): Requiring SSO needs an identity provider: bind an `oidc` connection to the organization first.\n- `organization_not_found` (404): No organization with that id in this account.\n- `invalid_user` (400): The user does not exist in this account.\n- `not_an_organization_admin` (404): The user is not an admin of the organization.\n- `last_organization_admin` (409): An organization keeps at least one admin. Add another admin before removing this one.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `invalid_permission` (400): A permission is not in the catalog of its Api, or the Api is not in this account. `details.permissions` lists the ones refused.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.\n- `account_mismatch` (400): The `account_id` in the body is not the account the request is scoped to (`x-faableauth-account`).\n- `connect_redirect_uri_missing` (400): The client's callbacks do not include `<site_url>/wp-login.php?faable-auth=callback`.\n- `invalid_site_url` (400): `site_url` is not an absolute http(s) URL without query string or fragment.\n- `handoff_not_found` (404): No connect handoff matches that code.\n- `handoff_expired` (410): The connect handoff is past its expiry. Start again.\n- `handoff_used` (410): The connect handoff was already redeemed.\n- `invalid_code_verifier` (400): `code_verifier` does not match the `code_challenge` of the handoff.",
9962
+ "description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `last_sign_in_method` (409): Unlinking this account would leave the user with no way to sign in: set a password, verify the email or link another account first.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (403): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `challenge_required` (428): The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.\n- `challenge_invalid` (428): The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.\n- `challenge_unsupported` (403): The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.\n- `origin_required` (403): This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `username_taken` (409): Another user of this database connection already uses that username.\n- `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): A client field was rejected: by dynamic client registration (RFC 7591), or on a client create/update (`initiate_login_uri`). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `invalid_saml_request` (400): The SAMLRequest is missing, too large, not well-formed or not a SAML 2.0 AuthnRequest.\n- `saml_sp_mismatch` (400): The AuthnRequest does not match the client's SAML configuration: its Issuer is not the configured entity_id, or it asks for another Assertion Consumer Service URL or binding.\n- `saml_not_enabled` (404): This client does not have SAML enabled.\n- `invalid_client_jwks` (400): The client `jwks` is not a valid set of public signing keys: RSA (2048 bits or more), EC (P-256, P-384, P-521) or Ed25519, public members only, up to 5, each with a `kid` when there is more than one.\n- `client_jwks_required` (400): A client whose `token_endpoint_auth_method` is `private_key_jwt` needs public keys in `jwks`.\n- `invalid_saml_sp` (400): The `saml_sp` configuration is invalid: `acs_url` must be an absolute https URL without a fragment.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `reauth_required` (403): The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.\n- `invalid_current_password` (400): The current password is wrong.\n- `email_not_verified` (403): The user's email is not verified, and the operation needs it to be.\n- `invalid_profile_field` (400): A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n- `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n- `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `consent_options_unavailable` (502): The consent screen could not load the choices from the API being authorized (its `consent_options.url`). Try again in a moment.\n- `consent_choice_invalid` (400): The choice sent with the consent decision is not one the API offered for this user.\n- `oauth21_required` (400): The tenant enforces OAuth 2.1 (`oauth21_enabled`) and the request is one OAuth 2.1 removed: a `response_type` other than `code`, an authorization request without PKCE (`code_challenge` with `S256`), or the password grant. `message` says which. Update the application (with `@faable/auth-js`, version 3.1.0 or later) or turn `oauth21_enabled` off for the tenant.\n- `registration_disabled` (403): Dynamic client registration is turned off for this tenant. Create the client from the dashboard or the Management API, or turn on `dynamic_client_registration_enabled`.\n- `invalid_email_domain` (400): Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.\n- `public_email_domain` (400): A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.\n- `organization_domain_not_found` (404): The organization has no such domain.\n- `organization_domain_taken` (409): Another organization of this tenant already verified this domain. A domain belongs to one organization.\n- `organization_domain_unverified` (400): The TXT record was not found or does not hold the expected value yet. `details.record` says what was expected and what resolves now; DNS can take a few minutes to propagate.\n- `plan_unavailable` (503): The plan could not be checked right now, and this setting is only for paid plans. Try again in a minute.\n- `organization_domain_mismatch` (403): This organization's identity provider can only sign in addresses of the organization's verified email domains.\n- `team_not_in_organization` (400): Auto-join can only put people in teams of the same organization. `details.teams` lists the others.\n- `organization_has_no_idp` (400): Requiring SSO needs an identity provider: bind an `oidc` connection to the organization first.\n- `organization_not_found` (404): No organization with that id in this account.\n- `invalid_user` (400): The user does not exist in this account.\n- `not_an_organization_admin` (404): The user is not an admin of the organization.\n- `last_organization_admin` (409): An organization keeps at least one admin. Add another admin before removing this one.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `invalid_permission` (400): A permission is not in the catalog of its Api, or the Api is not in this account. `details.permissions` lists the ones refused.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.\n- `account_mismatch` (400): The `account_id` in the body is not the account the request is scoped to (`x-faableauth-account`).\n- `connect_redirect_uri_missing` (400): The client's callbacks do not include `<site_url>/wp-login.php?faable-auth=callback`.\n- `invalid_site_url` (400): `site_url` is not an absolute http(s) URL without query string or fragment.\n- `handoff_not_found` (404): No connect handoff matches that code.\n- `handoff_expired` (410): The connect handoff is past its expiry. Start again.\n- `handoff_used` (410): The connect handoff was already redeemed.\n- `invalid_code_verifier` (400): `code_verifier` does not match the `code_challenge` of the handoff.",
9963
9963
  "enum": [
9964
9964
  "bad_request",
9965
9965
  "validation_error",
@@ -9999,6 +9999,10 @@
9999
9999
  "invalid_credentials",
10000
10000
  "login_denied",
10001
10001
  "signup_denied",
10002
+ "challenge_required",
10003
+ "challenge_invalid",
10004
+ "challenge_unsupported",
10005
+ "origin_required",
10002
10006
  "client_credentials_denied",
10003
10007
  "m2m_quota_exceeded",
10004
10008
  "signup_disabled",
@@ -70283,6 +70287,24 @@
70283
70287
  "state": {
70284
70288
  "type": "string",
70285
70289
  "description": "The login's key from `/authorize` — the hosted screen's `?state=`. Only ties the code this start issues to that login for tracing; it is not consumed and never rejects the request (`/passwordless/verify_code` is the step that uses it)."
70290
+ },
70291
+ "challenge": {
70292
+ "type": "object",
70293
+ "required": [
70294
+ "id",
70295
+ "nonce"
70296
+ ],
70297
+ "properties": {
70298
+ "id": {
70299
+ "type": "string",
70300
+ "maxLength": 64
70301
+ },
70302
+ "nonce": {
70303
+ "type": "string",
70304
+ "maxLength": 64
70305
+ }
70306
+ },
70307
+ "description": "Answer to a `challenge_required`: the challenge `id` and the `nonce` found. @faable/auth-js >= 3.4.0 fills it in."
70286
70308
  }
70287
70309
  }
70288
70310
  }
@@ -70324,7 +70346,7 @@
70324
70346
  }
70325
70347
  },
70326
70348
  "403": {
70327
- "description": "`origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.\n\n`signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.",
70349
+ "description": "`challenge_unsupported` — The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.\n\n`origin_required` — This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.\n\n`origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.\n\n`signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.",
70328
70350
  "content": {
70329
70351
  "application/json": {
70330
70352
  "schema": {
@@ -70338,6 +70360,8 @@
70338
70360
  "error_code": {
70339
70361
  "type": "string",
70340
70362
  "enum": [
70363
+ "challenge_unsupported",
70364
+ "origin_required",
70341
70365
  "origin_not_allowed",
70342
70366
  "signup_denied"
70343
70367
  ]
@@ -70374,6 +70398,32 @@
70374
70398
  }
70375
70399
  }
70376
70400
  },
70401
+ "428": {
70402
+ "description": "`challenge_invalid` — The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.\n\n`challenge_required` — The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.",
70403
+ "content": {
70404
+ "application/json": {
70405
+ "schema": {
70406
+ "allOf": [
70407
+ {
70408
+ "$ref": "#/components/schemas/ErrorResponse"
70409
+ },
70410
+ {
70411
+ "type": "object",
70412
+ "properties": {
70413
+ "error_code": {
70414
+ "type": "string",
70415
+ "enum": [
70416
+ "challenge_invalid",
70417
+ "challenge_required"
70418
+ ]
70419
+ }
70420
+ }
70421
+ }
70422
+ ]
70423
+ }
70424
+ }
70425
+ }
70426
+ },
70377
70427
  "429": {
70378
70428
  "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
70379
70429
  "content": {
@@ -83105,6 +83155,24 @@
83105
83155
  "client_id": {
83106
83156
  "type": "string",
83107
83157
  "description": "The application's Client ID. auth-js sends it. When it names a client of the tenant, that client's Allowed Web Origins and signup protection apply; an unknown or missing one is accepted (as before) and recorded."
83158
+ },
83159
+ "challenge": {
83160
+ "type": "object",
83161
+ "required": [
83162
+ "id",
83163
+ "nonce"
83164
+ ],
83165
+ "properties": {
83166
+ "id": {
83167
+ "type": "string",
83168
+ "maxLength": 64
83169
+ },
83170
+ "nonce": {
83171
+ "type": "string",
83172
+ "maxLength": 64
83173
+ }
83174
+ },
83175
+ "description": "Answer to a `challenge_required`: the challenge `id` and the `nonce` found. @faable/auth-js >= 3.4.0 fills it in."
83108
83176
  }
83109
83177
  },
83110
83178
  "additionalProperties": false
@@ -83146,7 +83214,7 @@
83146
83214
  }
83147
83215
  },
83148
83216
  "403": {
83149
- "description": "`origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.\n\n`signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n\n`signup_disabled` — Self-service sign-up is disabled on this connection.",
83217
+ "description": "`challenge_unsupported` — The client's signup protection requires the challenge on every signup and this client library cannot solve it. `message` names the minimum @faable/auth-js version.\n\n`origin_required` — This client only accepts the request from a browser: it has Allowed Web Origins and signup protection on, and the request carried no `Origin` header.\n\n`origin_not_allowed` — The request `Origin` is not in the client's Allowed Web Origins.\n\n`signup_denied` — A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n\n`signup_disabled` — Self-service sign-up is disabled on this connection.",
83150
83218
  "content": {
83151
83219
  "application/json": {
83152
83220
  "schema": {
@@ -83160,6 +83228,8 @@
83160
83228
  "error_code": {
83161
83229
  "type": "string",
83162
83230
  "enum": [
83231
+ "challenge_unsupported",
83232
+ "origin_required",
83163
83233
  "origin_not_allowed",
83164
83234
  "signup_denied",
83165
83235
  "signup_disabled"
@@ -83223,6 +83293,32 @@
83223
83293
  }
83224
83294
  }
83225
83295
  },
83296
+ "428": {
83297
+ "description": "`challenge_invalid` — The challenge answer was not accepted: unknown, expired or already used, issued for another request, or a wrong nonce. `details` carries a fresh challenge to solve.\n\n`challenge_required` — The client's signup protection asks for a proof-of-work challenge. `details` carries it (`id`, `kind: 'pow'`, `seed`, `email_hash`, `difficulty`, `expires_at`): find a `nonce` whose sha256(`seed:email_hash:nonce`) starts with `difficulty` zero bits and repeat the request with `challenge: { id, nonce }`. @faable/auth-js >= 3.4.0 does it for you.",
83298
+ "content": {
83299
+ "application/json": {
83300
+ "schema": {
83301
+ "allOf": [
83302
+ {
83303
+ "$ref": "#/components/schemas/ErrorResponse"
83304
+ },
83305
+ {
83306
+ "type": "object",
83307
+ "properties": {
83308
+ "error_code": {
83309
+ "type": "string",
83310
+ "enum": [
83311
+ "challenge_invalid",
83312
+ "challenge_required"
83313
+ ]
83314
+ }
83315
+ }
83316
+ }
83317
+ ]
83318
+ }
83319
+ }
83320
+ }
83321
+ },
83226
83322
  "429": {
83227
83323
  "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
83228
83324
  "content": {