@faable/auth-sdk 2.7.48 → 2.7.49

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.
@@ -94,6 +94,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
94
94
  default_country_iso?: string | null | undefined;
95
95
  webauthn_rp_id?: string | null | undefined;
96
96
  logout_confirm_required?: boolean | undefined;
97
+ canonical_host?: string | null | undefined;
97
98
  createdAt: string;
98
99
  updatedAt?: string | undefined;
99
100
  }>;
@@ -92,6 +92,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
92
92
  default_country_iso?: string | null | undefined;
93
93
  webauthn_rp_id?: string | null | undefined;
94
94
  logout_confirm_required?: boolean | undefined;
95
+ canonical_host?: string | null | undefined;
95
96
  createdAt: string;
96
97
  updatedAt?: string | undefined;
97
98
  }>;
@@ -166,6 +167,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
166
167
  default_country_iso?: string | null | undefined;
167
168
  webauthn_rp_id?: string | null | undefined;
168
169
  logout_confirm_required?: boolean | undefined;
170
+ canonical_host?: string | null | undefined;
169
171
  createdAt: string;
170
172
  updatedAt?: string | undefined;
171
173
  }>;
@@ -262,6 +264,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
262
264
  default_country_iso?: string | null | undefined;
263
265
  webauthn_rp_id?: string | null | undefined;
264
266
  logout_confirm_required?: boolean | undefined;
267
+ canonical_host?: string | null | undefined;
265
268
  createdAt: string;
266
269
  updatedAt?: string | undefined;
267
270
  }>;
@@ -360,6 +363,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
360
363
  default_country_iso?: string | null | undefined;
361
364
  webauthn_rp_id?: string | null | undefined;
362
365
  logout_confirm_required?: boolean | undefined;
366
+ canonical_host?: string | null | undefined;
363
367
  createdAt: string;
364
368
  updatedAt?: string | undefined;
365
369
  }[]>;
@@ -418,6 +422,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
418
422
  default_country_iso?: string | null | undefined;
419
423
  webauthn_rp_id?: string | null | undefined;
420
424
  logout_confirm_required?: boolean | undefined;
425
+ canonical_host?: string | null | undefined;
421
426
  createdAt: string;
422
427
  updatedAt?: string | undefined;
423
428
  }>>;
@@ -479,6 +484,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
479
484
  default_country_iso?: string | null | undefined;
480
485
  webauthn_rp_id?: string | null | undefined;
481
486
  logout_confirm_required?: boolean | undefined;
487
+ canonical_host?: string | null | undefined;
482
488
  createdAt: string;
483
489
  updatedAt?: string | undefined;
484
490
  }>>;
@@ -641,6 +647,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
641
647
  *
642
648
  * Update the Account configuration such as branding (logo and icon URLs).
643
649
  *
650
+ * @throws {FaableApiError} `invalid_canonical_host` (400) — `canonical_host` must be this account's own platform host or one of its verified custom domains.
651
+ * @throws {FaableApiError} `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.
644
652
  * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
645
653
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
646
654
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
@@ -709,6 +717,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
709
717
  default_country_iso?: string | null | undefined;
710
718
  webauthn_rp_id?: string | null | undefined;
711
719
  logout_confirm_required?: boolean | undefined;
720
+ canonical_host?: string | null | undefined;
712
721
  createdAt: string;
713
722
  updatedAt?: string | undefined;
714
723
  }>;
@@ -2001,22 +2010,6 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2001
2010
  password_policy?: {
2002
2011
  level: "none" | "low" | "fair" | "good" | "excellent";
2003
2012
  min_length?: number | undefined;
2004
- /**
2005
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
2006
- *
2007
- * Reset a user's passkey offer counter
2008
- *
2009
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
2010
- *
2011
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2012
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2013
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2014
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2015
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2016
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2017
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2018
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2019
- */
2020
2013
  require_lowercase?: boolean | undefined;
2021
2014
  require_uppercase?: boolean | undefined;
2022
2015
  require_number?: boolean | undefined;
@@ -2057,22 +2050,6 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2057
2050
  password_policy?: {
2058
2051
  level: "none" | "low" | "fair" | "good" | "excellent";
2059
2052
  min_length?: number | undefined;
2060
- /**
2061
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
2062
- *
2063
- * Reset a user's passkey offer counter
2064
- *
2065
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
2066
- *
2067
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2068
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2069
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2070
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2071
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2072
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2073
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2074
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2075
- */
2076
2053
  require_lowercase?: boolean | undefined;
2077
2054
  require_uppercase?: boolean | undefined;
2078
2055
  require_number?: boolean | undefined;
@@ -2116,22 +2093,6 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2116
2093
  password_policy?: {
2117
2094
  level: "none" | "low" | "fair" | "good" | "excellent";
2118
2095
  min_length?: number | undefined;
2119
- /**
2120
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
2121
- *
2122
- * Reset a user's passkey offer counter
2123
- *
2124
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
2125
- *
2126
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2127
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2128
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2129
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2130
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2131
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2132
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2133
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2134
- */
2135
2096
  require_lowercase?: boolean | undefined;
2136
2097
  require_uppercase?: boolean | undefined;
2137
2098
  require_number?: boolean | undefined;
@@ -221,6 +221,8 @@ export class GeneratedFaableAuthApi extends FaableApi {
221
221
  *
222
222
  * Update the Account configuration such as branding (logo and icon URLs).
223
223
  *
224
+ * @throws {FaableApiError} `invalid_canonical_host` (400) — `canonical_host` must be this account's own platform host or one of its verified custom domains.
225
+ * @throws {FaableApiError} `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.
224
226
  * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
225
227
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
226
228
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
@@ -4517,6 +4517,8 @@ export interface components {
4517
4517
  webauthn_rp_id?: string | null;
4518
4518
  /** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
4519
4519
  logout_confirm_required?: boolean;
4520
+ /** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
4521
+ canonical_host?: string | null;
4520
4522
  /** @description AuthAccount creation date */
4521
4523
  createdAt: string;
4522
4524
  /** @description AuthAccount updated date */
@@ -6500,6 +6502,7 @@ export interface components {
6500
6502
  default_country_iso?: string | null;
6501
6503
  webauthn_rp_id?: string | null;
6502
6504
  logout_confirm_required?: boolean | null;
6505
+ canonical_host?: string | null;
6503
6506
  login_flow?: string | null;
6504
6507
  };
6505
6508
  FactorSummary: {
@@ -6615,6 +6618,8 @@ export interface components {
6615
6618
  * - `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.
6616
6619
  * - `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.
6617
6620
  * - `plan_required` (402): The setting requires a higher plan. `message` says which.
6621
+ * - `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.
6622
+ * - `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.
6618
6623
  * - `not_logged_in` (401): There is no signed-in session for this request.
6619
6624
  * - `session_already_revoked` (409): The session was already revoked.
6620
6625
  * - `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.
@@ -6704,7 +6709,7 @@ export interface components {
6704
6709
  * - `revision_not_found` (404): The revision is not in the flow history.
6705
6710
  * @enum {string}
6706
6711
  */
6707
- ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "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" | "plan_required" | "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" | "invalid_email" | "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" | "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" | "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" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found";
6712
+ ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "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" | "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" | "invalid_email" | "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" | "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" | "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" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found";
6708
6713
  /** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
6709
6714
  ErrorResponse: {
6710
6715
  /** @description The HTTP status, repeated. */
@@ -6858,6 +6863,8 @@ export interface operations {
6858
6863
  webauthn_rp_id?: string | null;
6859
6864
  /** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
6860
6865
  logout_confirm_required?: boolean;
6866
+ /** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
6867
+ canonical_host?: string | null;
6861
6868
  /** @description AuthAccount creation date */
6862
6869
  createdAt: string;
6863
6870
  /** @description AuthAccount updated date */
@@ -7205,6 +7212,8 @@ export interface operations {
7205
7212
  webauthn_rp_id?: string | null;
7206
7213
  /** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
7207
7214
  logout_confirm_required?: boolean;
7215
+ /** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
7216
+ canonical_host?: string | null;
7208
7217
  /** @description AuthAccount creation date */
7209
7218
  createdAt: string;
7210
7219
  /** @description AuthAccount updated date */
@@ -7438,6 +7447,8 @@ export interface operations {
7438
7447
  webauthn_rp_id?: string | null;
7439
7448
  /** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
7440
7449
  logout_confirm_required?: boolean;
7450
+ /** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
7451
+ canonical_host?: string | null;
7441
7452
  /** @description AuthAccount creation date */
7442
7453
  createdAt: string;
7443
7454
  /** @description AuthAccount updated date */
@@ -7625,6 +7636,7 @@ export interface operations {
7625
7636
  default_country_iso?: string | null;
7626
7637
  webauthn_rp_id?: string | null;
7627
7638
  logout_confirm_required?: boolean | null;
7639
+ canonical_host?: string | null;
7628
7640
  login_flow?: string | null;
7629
7641
  };
7630
7642
  };
@@ -7744,6 +7756,8 @@ export interface operations {
7744
7756
  webauthn_rp_id?: string | null;
7745
7757
  /** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
7746
7758
  logout_confirm_required?: boolean;
7759
+ /** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
7760
+ canonical_host?: string | null;
7747
7761
  /** @description AuthAccount creation date */
7748
7762
  createdAt: string;
7749
7763
  /** @description AuthAccount updated date */
@@ -7752,7 +7766,11 @@ export interface operations {
7752
7766
  };
7753
7767
  };
7754
7768
  /**
7755
- * @description `invalid_id` — The id in the path is not a valid id for this resource.
7769
+ * @description `invalid_canonical_host` — `canonical_host` must be this account's own platform host or one of its verified custom domains.
7770
+ *
7771
+ * `canonical_host_breaks_passkeys` — `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.
7772
+ *
7773
+ * `invalid_id` — The id in the path is not a valid id for this resource.
7756
7774
  *
7757
7775
  * `already_exists` — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
7758
7776
  *
@@ -7765,7 +7783,7 @@ export interface operations {
7765
7783
  content: {
7766
7784
  "application/json": components["schemas"]["ErrorResponse"] & {
7767
7785
  /** @enum {string} */
7768
- error_code?: "invalid_id" | "already_exists" | "validation_error";
7786
+ error_code?: "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "invalid_id" | "already_exists" | "validation_error";
7769
7787
  };
7770
7788
  };
7771
7789
  };
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.7.48";
12
+ export const version = "2.7.49";
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 = "107737e";
18
+ export const commit = "e20daa6";
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.7.48",
3
+ "version": "2.7.49",
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.46.2",
6
+ "version": "2.47.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -498,6 +498,11 @@
498
498
  "type": "boolean",
499
499
  "description": "When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF)."
500
500
  },
501
+ "canonical_host": {
502
+ "type": "string",
503
+ "description": "The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host.",
504
+ "nullable": true
505
+ },
501
506
  "createdAt": {
502
507
  "type": "string",
503
508
  "description": "AuthAccount creation date"
@@ -7122,6 +7127,10 @@
7122
7127
  }
7123
7128
  ]
7124
7129
  },
7130
+ "canonical_host": {
7131
+ "type": "string",
7132
+ "nullable": true
7133
+ },
7125
7134
  "login_flow": {
7126
7135
  "type": "string",
7127
7136
  "nullable": true
@@ -7449,7 +7458,7 @@
7449
7458
  },
7450
7459
  "ErrorCode": {
7451
7460
  "type": "string",
7452
- "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- `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` (401): 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- `plan_required` (402): The setting requires a higher plan. `message` says which.\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- `invalid_email` (400): The email address is not valid.\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): Dynamic client registration rejected a field (RFC 7591). `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- `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- `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- `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- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\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.",
7461
+ "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- `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` (401): 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- `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- `invalid_email` (400): The email address is not valid.\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): Dynamic client registration rejected a field (RFC 7591). `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- `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- `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- `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- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\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.",
7453
7462
  "enum": [
7454
7463
  "bad_request",
7455
7464
  "validation_error",
@@ -7477,6 +7486,8 @@
7477
7486
  "invalid_project_id",
7478
7487
  "account_transfer_refused",
7479
7488
  "plan_required",
7489
+ "invalid_canonical_host",
7490
+ "canonical_host_breaks_passkeys",
7480
7491
  "not_logged_in",
7481
7492
  "session_already_revoked",
7482
7493
  "invalid_token",
@@ -8182,6 +8193,11 @@
8182
8193
  "type": "boolean",
8183
8194
  "description": "When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF)."
8184
8195
  },
8196
+ "canonical_host": {
8197
+ "type": "string",
8198
+ "description": "The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host.",
8199
+ "nullable": true
8200
+ },
8185
8201
  "createdAt": {
8186
8202
  "type": "string",
8187
8203
  "description": "AuthAccount creation date"
@@ -8887,6 +8903,11 @@
8887
8903
  "type": "boolean",
8888
8904
  "description": "When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF)."
8889
8905
  },
8906
+ "canonical_host": {
8907
+ "type": "string",
8908
+ "description": "The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host.",
8909
+ "nullable": true
8910
+ },
8890
8911
  "createdAt": {
8891
8912
  "type": "string",
8892
8913
  "description": "AuthAccount creation date"
@@ -9828,6 +9849,11 @@
9828
9849
  "type": "boolean",
9829
9850
  "description": "When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF)."
9830
9851
  },
9852
+ "canonical_host": {
9853
+ "type": "string",
9854
+ "description": "The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host.",
9855
+ "nullable": true
9856
+ },
9831
9857
  "createdAt": {
9832
9858
  "type": "string",
9833
9859
  "description": "AuthAccount creation date"
@@ -10419,6 +10445,10 @@
10419
10445
  }
10420
10446
  ]
10421
10447
  },
10448
+ "canonical_host": {
10449
+ "type": "string",
10450
+ "nullable": true
10451
+ },
10422
10452
  "login_flow": {
10423
10453
  "type": "string",
10424
10454
  "nullable": true
@@ -10913,6 +10943,11 @@
10913
10943
  "type": "boolean",
10914
10944
  "description": "When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF)."
10915
10945
  },
10946
+ "canonical_host": {
10947
+ "type": "string",
10948
+ "description": "The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host.",
10949
+ "nullable": true
10950
+ },
10916
10951
  "createdAt": {
10917
10952
  "type": "string",
10918
10953
  "description": "AuthAccount creation date"
@@ -10928,7 +10963,7 @@
10928
10963
  }
10929
10964
  },
10930
10965
  "400": {
10931
- "description": "`invalid_id` — The id in the path is not a valid id for this resource.\n\n`already_exists` — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
10966
+ "description": "`invalid_canonical_host` — `canonical_host` must be this account's own platform host or one of its verified custom domains.\n\n`canonical_host_breaks_passkeys` — `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\n`invalid_id` — The id in the path is not a valid id for this resource.\n\n`already_exists` — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
10932
10967
  "content": {
10933
10968
  "application/json": {
10934
10969
  "schema": {
@@ -10942,6 +10977,8 @@
10942
10977
  "error_code": {
10943
10978
  "type": "string",
10944
10979
  "enum": [
10980
+ "invalid_canonical_host",
10981
+ "canonical_host_breaks_passkeys",
10945
10982
  "invalid_id",
10946
10983
  "already_exists",
10947
10984
  "validation_error"