@faable/auth-sdk 2.9.36 → 2.9.38
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.
- package/dist/FaableAuthApi.d.ts +24 -0
- package/dist/api/generated-client.d.ts +28 -0
- package/dist/api/types.d.ts +100 -10
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +295 -11
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -129,7 +129,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
129
129
|
challenge_passed?: {
|
|
130
130
|
method: string;
|
|
131
131
|
difficulty: number;
|
|
132
|
+
source?: "auth" | "site" | undefined;
|
|
132
133
|
client_id?: string | undefined;
|
|
134
|
+
site_id?: string | undefined;
|
|
135
|
+
hostname?: string | undefined;
|
|
136
|
+
action?: string | null | undefined;
|
|
133
137
|
} | undefined;
|
|
134
138
|
email_change_locked_at?: string | null | undefined;
|
|
135
139
|
email_bounced_at?: string | null | undefined;
|
|
@@ -223,7 +227,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
223
227
|
challenge_passed?: {
|
|
224
228
|
method: string;
|
|
225
229
|
difficulty: number;
|
|
230
|
+
source?: "auth" | "site" | undefined;
|
|
226
231
|
client_id?: string | undefined;
|
|
232
|
+
site_id?: string | undefined;
|
|
233
|
+
hostname?: string | undefined;
|
|
234
|
+
action?: string | null | undefined;
|
|
227
235
|
} | undefined;
|
|
228
236
|
email_change_locked_at?: string | null | undefined;
|
|
229
237
|
email_bounced_at?: string | null | undefined;
|
|
@@ -320,7 +328,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
320
328
|
challenge_passed?: {
|
|
321
329
|
method: string;
|
|
322
330
|
difficulty: number;
|
|
331
|
+
source?: "auth" | "site" | undefined;
|
|
323
332
|
client_id?: string | undefined;
|
|
333
|
+
site_id?: string | undefined;
|
|
334
|
+
hostname?: string | undefined;
|
|
335
|
+
action?: string | null | undefined;
|
|
324
336
|
} | undefined;
|
|
325
337
|
email_change_locked_at?: string | null | undefined;
|
|
326
338
|
email_bounced_at?: string | null | undefined;
|
|
@@ -416,7 +428,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
416
428
|
challenge_passed?: {
|
|
417
429
|
method: string;
|
|
418
430
|
difficulty: number;
|
|
431
|
+
source?: "auth" | "site" | undefined;
|
|
419
432
|
client_id?: string | undefined;
|
|
433
|
+
site_id?: string | undefined;
|
|
434
|
+
hostname?: string | undefined;
|
|
435
|
+
action?: string | null | undefined;
|
|
420
436
|
} | undefined;
|
|
421
437
|
email_change_locked_at?: string | null | undefined;
|
|
422
438
|
email_bounced_at?: string | null | undefined;
|
|
@@ -511,7 +527,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
511
527
|
challenge_passed?: {
|
|
512
528
|
method: string;
|
|
513
529
|
difficulty: number;
|
|
530
|
+
source?: "auth" | "site" | undefined;
|
|
514
531
|
client_id?: string | undefined;
|
|
532
|
+
site_id?: string | undefined;
|
|
533
|
+
hostname?: string | undefined;
|
|
534
|
+
action?: string | null | undefined;
|
|
515
535
|
} | undefined;
|
|
516
536
|
email_change_locked_at?: string | null | undefined;
|
|
517
537
|
email_bounced_at?: string | null | undefined;
|
|
@@ -606,7 +626,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
606
626
|
challenge_passed?: {
|
|
607
627
|
method: string;
|
|
608
628
|
difficulty: number;
|
|
629
|
+
source?: "auth" | "site" | undefined;
|
|
609
630
|
client_id?: string | undefined;
|
|
631
|
+
site_id?: string | undefined;
|
|
632
|
+
hostname?: string | undefined;
|
|
633
|
+
action?: string | null | undefined;
|
|
610
634
|
} | undefined;
|
|
611
635
|
email_change_locked_at?: string | null | undefined;
|
|
612
636
|
email_bounced_at?: string | null | undefined;
|
|
@@ -6953,7 +6953,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
6953
6953
|
challenge_passed?: {
|
|
6954
6954
|
method: string;
|
|
6955
6955
|
difficulty: number;
|
|
6956
|
+
source?: "auth" | "site" | undefined;
|
|
6956
6957
|
client_id?: string | undefined;
|
|
6958
|
+
site_id?: string | undefined;
|
|
6959
|
+
hostname?: string | undefined;
|
|
6960
|
+
action?: string | null | undefined;
|
|
6957
6961
|
} | undefined;
|
|
6958
6962
|
email_change_locked_at?: string | null | undefined;
|
|
6959
6963
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7063,7 +7067,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7063
7067
|
challenge_passed?: {
|
|
7064
7068
|
method: string;
|
|
7065
7069
|
difficulty: number;
|
|
7070
|
+
source?: "auth" | "site" | undefined;
|
|
7066
7071
|
client_id?: string | undefined;
|
|
7072
|
+
site_id?: string | undefined;
|
|
7073
|
+
hostname?: string | undefined;
|
|
7074
|
+
action?: string | null | undefined;
|
|
7067
7075
|
} | undefined;
|
|
7068
7076
|
email_change_locked_at?: string | null | undefined;
|
|
7069
7077
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7266,7 +7274,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7266
7274
|
challenge_passed?: {
|
|
7267
7275
|
method: string;
|
|
7268
7276
|
difficulty: number;
|
|
7277
|
+
source?: "auth" | "site" | undefined;
|
|
7269
7278
|
client_id?: string | undefined;
|
|
7279
|
+
site_id?: string | undefined;
|
|
7280
|
+
hostname?: string | undefined;
|
|
7281
|
+
action?: string | null | undefined;
|
|
7270
7282
|
} | undefined;
|
|
7271
7283
|
email_change_locked_at?: string | null | undefined;
|
|
7272
7284
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7461,7 +7473,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7461
7473
|
challenge_passed?: {
|
|
7462
7474
|
method: string;
|
|
7463
7475
|
difficulty: number;
|
|
7476
|
+
source?: "auth" | "site" | undefined;
|
|
7464
7477
|
client_id?: string | undefined;
|
|
7478
|
+
site_id?: string | undefined;
|
|
7479
|
+
hostname?: string | undefined;
|
|
7480
|
+
action?: string | null | undefined;
|
|
7465
7481
|
} | undefined;
|
|
7466
7482
|
email_change_locked_at?: string | null | undefined;
|
|
7467
7483
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7555,7 +7571,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7555
7571
|
challenge_passed?: {
|
|
7556
7572
|
method: string;
|
|
7557
7573
|
difficulty: number;
|
|
7574
|
+
source?: "auth" | "site" | undefined;
|
|
7558
7575
|
client_id?: string | undefined;
|
|
7576
|
+
site_id?: string | undefined;
|
|
7577
|
+
hostname?: string | undefined;
|
|
7578
|
+
action?: string | null | undefined;
|
|
7559
7579
|
} | undefined;
|
|
7560
7580
|
email_change_locked_at?: string | null | undefined;
|
|
7561
7581
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7652,7 +7672,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7652
7672
|
challenge_passed?: {
|
|
7653
7673
|
method: string;
|
|
7654
7674
|
difficulty: number;
|
|
7675
|
+
source?: "auth" | "site" | undefined;
|
|
7655
7676
|
client_id?: string | undefined;
|
|
7677
|
+
site_id?: string | undefined;
|
|
7678
|
+
hostname?: string | undefined;
|
|
7679
|
+
action?: string | null | undefined;
|
|
7656
7680
|
} | undefined;
|
|
7657
7681
|
email_change_locked_at?: string | null | undefined;
|
|
7658
7682
|
email_bounced_at?: string | null | undefined;
|
|
@@ -7953,7 +7977,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
7953
7977
|
challenge_passed?: {
|
|
7954
7978
|
method: string;
|
|
7955
7979
|
difficulty: number;
|
|
7980
|
+
source?: "auth" | "site" | undefined;
|
|
7956
7981
|
client_id?: string | undefined;
|
|
7982
|
+
site_id?: string | undefined;
|
|
7983
|
+
hostname?: string | undefined;
|
|
7984
|
+
action?: string | null | undefined;
|
|
7957
7985
|
} | undefined;
|
|
7958
7986
|
email_change_locked_at?: string | null | undefined;
|
|
7959
7987
|
email_bounced_at?: string | null | undefined;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -4643,7 +4643,7 @@ export interface paths {
|
|
|
4643
4643
|
head?: never;
|
|
4644
4644
|
/**
|
|
4645
4645
|
* Update current User profile
|
|
4646
|
-
* @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso` and the custom `fields` the application declares (`profile_fields`) can be changed; `company_name` and `fields` are merged into `user_metadata` without touching its other keys. A Bearer token must belong to this Account.
|
|
4646
|
+
* @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso`, `phone` and the custom `fields` the application declares (`profile_fields`) can be changed; `company_name` and `fields` are merged into `user_metadata` without touching its other keys. `phone` is normalised to E.164 with the account default country (400 `invalid_phone` if it does not normalise, and nothing is written); a verified phone can only be changed through `POST /user/:id/verify-phone/start`, so a different number (or `null`) answers 409 `phone_verified`. A Bearer token must belong to this Account.
|
|
4647
4647
|
*/
|
|
4648
4648
|
patch: operations["session/me_update"];
|
|
4649
4649
|
trace?: never;
|
|
@@ -6454,7 +6454,7 @@ export interface components {
|
|
|
6454
6454
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
6455
6455
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
6456
6456
|
email_verified_at?: string | null;
|
|
6457
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
6457
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
6458
6458
|
challenge_passed_at?: string | null;
|
|
6459
6459
|
/** @description Details of `challenge_passed_at`. */
|
|
6460
6460
|
challenge_passed?: {
|
|
@@ -6462,8 +6462,16 @@ export interface components {
|
|
|
6462
6462
|
method: string;
|
|
6463
6463
|
/** @description Leading zero bits the proof had to reach. */
|
|
6464
6464
|
difficulty: number;
|
|
6465
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
6466
|
+
source?: "auth" | "site";
|
|
6465
6467
|
/** @description Client ID of the form that asked for it. */
|
|
6466
6468
|
client_id?: string;
|
|
6469
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
6470
|
+
site_id?: string;
|
|
6471
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
6472
|
+
hostname?: string;
|
|
6473
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
6474
|
+
action?: string | null;
|
|
6467
6475
|
};
|
|
6468
6476
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
6469
6477
|
email_change_locked_at?: string | null;
|
|
@@ -6653,6 +6661,10 @@ export interface components {
|
|
|
6653
6661
|
app_metadata?: {
|
|
6654
6662
|
[key: string]: unknown;
|
|
6655
6663
|
};
|
|
6664
|
+
/** @description Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`. */
|
|
6665
|
+
challenge_token?: string;
|
|
6666
|
+
/** @description The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`. */
|
|
6667
|
+
challenge_receipt?: string;
|
|
6656
6668
|
};
|
|
6657
6669
|
/** @description User Metadata */
|
|
6658
6670
|
UserUserCreate: {
|
|
@@ -6698,6 +6710,10 @@ export interface components {
|
|
|
6698
6710
|
app_metadata?: {
|
|
6699
6711
|
[key: string]: unknown;
|
|
6700
6712
|
};
|
|
6713
|
+
/** @description Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`. */
|
|
6714
|
+
challenge_token?: string;
|
|
6715
|
+
/** @description The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`. */
|
|
6716
|
+
challenge_receipt?: string;
|
|
6701
6717
|
};
|
|
6702
6718
|
/** @description User defined metadata */
|
|
6703
6719
|
UserUserMetadataUpdate: {
|
|
@@ -8743,6 +8759,7 @@ export interface components {
|
|
|
8743
8759
|
* - `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.
|
|
8744
8760
|
* - `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.
|
|
8745
8761
|
* - `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.
|
|
8762
|
+
* - `challenge_unavailable` (503): Faable Challenge could not verify the `challenge_token` sent with this user (it did not answer). Nothing was written: retry the request.
|
|
8746
8763
|
* - `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.
|
|
8747
8764
|
* - `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.
|
|
8748
8765
|
* - `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.
|
|
@@ -8761,6 +8778,7 @@ export interface components {
|
|
|
8761
8778
|
* - `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
|
|
8762
8779
|
* - `phone_changed` (400): The phone on the user changed after the code was sent. Start again.
|
|
8763
8780
|
* - `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.
|
|
8781
|
+
* - `phone_verified` (409): The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error.
|
|
8764
8782
|
* - `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.
|
|
8765
8783
|
* - `sms_failed` (409): The SMS provider rejected the message.
|
|
8766
8784
|
* - `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.
|
|
@@ -8873,7 +8891,7 @@ export interface components {
|
|
|
8873
8891
|
* - `invalid_code_verifier` (400): `code_verifier` does not match the `code_challenge` of the handoff.
|
|
8874
8892
|
* @enum {string}
|
|
8875
8893
|
*/
|
|
8876
|
-
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";
|
|
8894
|
+
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" | "challenge_unavailable" | "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" | "phone_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";
|
|
8877
8895
|
/** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
|
|
8878
8896
|
ErrorResponse: {
|
|
8879
8897
|
/** @description The HTTP status, repeated. */
|
|
@@ -14822,6 +14840,10 @@ export interface operations {
|
|
|
14822
14840
|
app_metadata?: {
|
|
14823
14841
|
[key: string]: unknown;
|
|
14824
14842
|
};
|
|
14843
|
+
/** @description Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`. */
|
|
14844
|
+
challenge_token?: string;
|
|
14845
|
+
/** @description The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`. */
|
|
14846
|
+
challenge_receipt?: string;
|
|
14825
14847
|
};
|
|
14826
14848
|
};
|
|
14827
14849
|
};
|
|
@@ -14858,7 +14880,7 @@ export interface operations {
|
|
|
14858
14880
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
14859
14881
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
14860
14882
|
email_verified_at?: string | null;
|
|
14861
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
14883
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
14862
14884
|
challenge_passed_at?: string | null;
|
|
14863
14885
|
/** @description Details of `challenge_passed_at`. */
|
|
14864
14886
|
challenge_passed?: {
|
|
@@ -14866,8 +14888,16 @@ export interface operations {
|
|
|
14866
14888
|
method: string;
|
|
14867
14889
|
/** @description Leading zero bits the proof had to reach. */
|
|
14868
14890
|
difficulty: number;
|
|
14891
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
14892
|
+
source?: "auth" | "site";
|
|
14869
14893
|
/** @description Client ID of the form that asked for it. */
|
|
14870
14894
|
client_id?: string;
|
|
14895
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
14896
|
+
site_id?: string;
|
|
14897
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
14898
|
+
hostname?: string;
|
|
14899
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
14900
|
+
action?: string | null;
|
|
14871
14901
|
};
|
|
14872
14902
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
14873
14903
|
email_change_locked_at?: string | null;
|
|
@@ -15131,7 +15161,7 @@ export interface operations {
|
|
|
15131
15161
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
15132
15162
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
15133
15163
|
email_verified_at?: string | null;
|
|
15134
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
15164
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
15135
15165
|
challenge_passed_at?: string | null;
|
|
15136
15166
|
/** @description Details of `challenge_passed_at`. */
|
|
15137
15167
|
challenge_passed?: {
|
|
@@ -15139,8 +15169,16 @@ export interface operations {
|
|
|
15139
15169
|
method: string;
|
|
15140
15170
|
/** @description Leading zero bits the proof had to reach. */
|
|
15141
15171
|
difficulty: number;
|
|
15172
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
15173
|
+
source?: "auth" | "site";
|
|
15142
15174
|
/** @description Client ID of the form that asked for it. */
|
|
15143
15175
|
client_id?: string;
|
|
15176
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
15177
|
+
site_id?: string;
|
|
15178
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
15179
|
+
hostname?: string;
|
|
15180
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
15181
|
+
action?: string | null;
|
|
15144
15182
|
};
|
|
15145
15183
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
15146
15184
|
email_change_locked_at?: string | null;
|
|
@@ -15410,6 +15448,10 @@ export interface operations {
|
|
|
15410
15448
|
app_metadata?: {
|
|
15411
15449
|
[key: string]: unknown;
|
|
15412
15450
|
};
|
|
15451
|
+
/** @description Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`. */
|
|
15452
|
+
challenge_token?: string;
|
|
15453
|
+
/** @description The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`. */
|
|
15454
|
+
challenge_receipt?: string;
|
|
15413
15455
|
};
|
|
15414
15456
|
};
|
|
15415
15457
|
};
|
|
@@ -15446,7 +15488,7 @@ export interface operations {
|
|
|
15446
15488
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
15447
15489
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
15448
15490
|
email_verified_at?: string | null;
|
|
15449
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
15491
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
15450
15492
|
challenge_passed_at?: string | null;
|
|
15451
15493
|
/** @description Details of `challenge_passed_at`. */
|
|
15452
15494
|
challenge_passed?: {
|
|
@@ -15454,8 +15496,16 @@ export interface operations {
|
|
|
15454
15496
|
method: string;
|
|
15455
15497
|
/** @description Leading zero bits the proof had to reach. */
|
|
15456
15498
|
difficulty: number;
|
|
15499
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
15500
|
+
source?: "auth" | "site";
|
|
15457
15501
|
/** @description Client ID of the form that asked for it. */
|
|
15458
15502
|
client_id?: string;
|
|
15503
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
15504
|
+
site_id?: string;
|
|
15505
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
15506
|
+
hostname?: string;
|
|
15507
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
15508
|
+
action?: string | null;
|
|
15459
15509
|
};
|
|
15460
15510
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
15461
15511
|
email_change_locked_at?: string | null;
|
|
@@ -15725,7 +15775,7 @@ export interface operations {
|
|
|
15725
15775
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
15726
15776
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
15727
15777
|
email_verified_at?: string | null;
|
|
15728
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
15778
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
15729
15779
|
challenge_passed_at?: string | null;
|
|
15730
15780
|
/** @description Details of `challenge_passed_at`. */
|
|
15731
15781
|
challenge_passed?: {
|
|
@@ -15733,8 +15783,16 @@ export interface operations {
|
|
|
15733
15783
|
method: string;
|
|
15734
15784
|
/** @description Leading zero bits the proof had to reach. */
|
|
15735
15785
|
difficulty: number;
|
|
15786
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
15787
|
+
source?: "auth" | "site";
|
|
15736
15788
|
/** @description Client ID of the form that asked for it. */
|
|
15737
15789
|
client_id?: string;
|
|
15790
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
15791
|
+
site_id?: string;
|
|
15792
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
15793
|
+
hostname?: string;
|
|
15794
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
15795
|
+
action?: string | null;
|
|
15738
15796
|
};
|
|
15739
15797
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
15740
15798
|
email_change_locked_at?: string | null;
|
|
@@ -34574,7 +34632,7 @@ export interface operations {
|
|
|
34574
34632
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
34575
34633
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
34576
34634
|
email_verified_at?: string | null;
|
|
34577
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
34635
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
34578
34636
|
challenge_passed_at?: string | null;
|
|
34579
34637
|
/** @description Details of `challenge_passed_at`. */
|
|
34580
34638
|
challenge_passed?: {
|
|
@@ -34582,8 +34640,16 @@ export interface operations {
|
|
|
34582
34640
|
method: string;
|
|
34583
34641
|
/** @description Leading zero bits the proof had to reach. */
|
|
34584
34642
|
difficulty: number;
|
|
34643
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
34644
|
+
source?: "auth" | "site";
|
|
34585
34645
|
/** @description Client ID of the form that asked for it. */
|
|
34586
34646
|
client_id?: string;
|
|
34647
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
34648
|
+
site_id?: string;
|
|
34649
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
34650
|
+
hostname?: string;
|
|
34651
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
34652
|
+
action?: string | null;
|
|
34587
34653
|
};
|
|
34588
34654
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
34589
34655
|
email_change_locked_at?: string | null;
|
|
@@ -34880,6 +34946,8 @@ export interface operations {
|
|
|
34880
34946
|
name?: string;
|
|
34881
34947
|
company_name?: string;
|
|
34882
34948
|
country_iso?: string;
|
|
34949
|
+
/** @description The phone number, `null` to remove it. Normalised to E.164 with the account default country (`636 123 456` → `+34636123456`); one that does not normalise fails with 400 `invalid_phone`. A verified phone cannot be changed or removed here (409 `phone_verified`): use `POST /user/:id/verify-phone/start`. Changing an unverified phone leaves `phone_verified: false`. */
|
|
34950
|
+
phone?: string | null;
|
|
34883
34951
|
/** @description Custom profile fields, stored in `user_metadata["faable.com/fields"]` and merged by key: keys not named here are kept, `null` removes one. Only the keys the application declares in `profile_fields` (Client, else Account) are accepted; any other key fails the whole request with `invalid_profile_field`. */
|
|
34884
34952
|
fields?: {
|
|
34885
34953
|
key: string;
|
|
@@ -34921,7 +34989,7 @@ export interface operations {
|
|
|
34921
34989
|
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null;
|
|
34922
34990
|
/** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
|
|
34923
34991
|
email_verified_at?: string | null;
|
|
34924
|
-
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
34992
|
+
/** @description ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one. */
|
|
34925
34993
|
challenge_passed_at?: string | null;
|
|
34926
34994
|
/** @description Details of `challenge_passed_at`. */
|
|
34927
34995
|
challenge_passed?: {
|
|
@@ -34929,8 +34997,16 @@ export interface operations {
|
|
|
34929
34997
|
method: string;
|
|
34930
34998
|
/** @description Leading zero bits the proof had to reach. */
|
|
34931
34999
|
difficulty: number;
|
|
35000
|
+
/** @description `auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API. */
|
|
35001
|
+
source?: "auth" | "site";
|
|
34932
35002
|
/** @description Client ID of the form that asked for it. */
|
|
34933
35003
|
client_id?: string;
|
|
35004
|
+
/** @description Faable Challenge site (`source: site`). */
|
|
35005
|
+
site_id?: string;
|
|
35006
|
+
/** @description Hostname of the page where it was solved (`source: site`). */
|
|
35007
|
+
hostname?: string;
|
|
35008
|
+
/** @description The action label of the form (`booking`, `contact`…), `source: site`. */
|
|
35009
|
+
action?: string | null;
|
|
34934
35010
|
};
|
|
34935
35011
|
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
34936
35012
|
email_change_locked_at?: string | null;
|
|
@@ -35070,6 +35146,8 @@ export interface operations {
|
|
|
35070
35146
|
*
|
|
35071
35147
|
* `invalid_profile_field` — A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.
|
|
35072
35148
|
*
|
|
35149
|
+
* `invalid_phone` — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
|
|
35150
|
+
*
|
|
35073
35151
|
* `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
35074
35152
|
*/
|
|
35075
35153
|
400: {
|
|
@@ -35079,7 +35157,7 @@ export interface operations {
|
|
|
35079
35157
|
content: {
|
|
35080
35158
|
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
35081
35159
|
/** @enum {string} */
|
|
35082
|
-
error_code?: "bad_request" | "invalid_profile_field" | "validation_error";
|
|
35160
|
+
error_code?: "bad_request" | "invalid_profile_field" | "invalid_phone" | "validation_error";
|
|
35083
35161
|
};
|
|
35084
35162
|
};
|
|
35085
35163
|
};
|
|
@@ -35123,6 +35201,18 @@ export interface operations {
|
|
|
35123
35201
|
};
|
|
35124
35202
|
};
|
|
35125
35203
|
};
|
|
35204
|
+
/** @description `phone_verified` — The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error. */
|
|
35205
|
+
409: {
|
|
35206
|
+
headers: {
|
|
35207
|
+
[name: string]: unknown;
|
|
35208
|
+
};
|
|
35209
|
+
content: {
|
|
35210
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
35211
|
+
/** @enum {string} */
|
|
35212
|
+
error_code?: "phone_verified";
|
|
35213
|
+
};
|
|
35214
|
+
};
|
|
35215
|
+
};
|
|
35126
35216
|
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
35127
35217
|
429: {
|
|
35128
35218
|
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.
|
|
12
|
+
export const version = "2.9.38";
|
|
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 = "
|
|
18
|
+
export const commit = "5110017";
|
|
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
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.
|
|
6
|
+
"version": "2.115.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -3455,7 +3455,7 @@
|
|
|
3455
3455
|
},
|
|
3456
3456
|
"challenge_passed_at": {
|
|
3457
3457
|
"type": "string",
|
|
3458
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
3458
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
3459
3459
|
"nullable": true
|
|
3460
3460
|
},
|
|
3461
3461
|
"challenge_passed": {
|
|
@@ -3473,9 +3473,39 @@
|
|
|
3473
3473
|
"type": "number",
|
|
3474
3474
|
"description": "Leading zero bits the proof had to reach."
|
|
3475
3475
|
},
|
|
3476
|
+
"source": {
|
|
3477
|
+
"anyOf": [
|
|
3478
|
+
{
|
|
3479
|
+
"type": "string",
|
|
3480
|
+
"enum": [
|
|
3481
|
+
"auth"
|
|
3482
|
+
]
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
"type": "string",
|
|
3486
|
+
"enum": [
|
|
3487
|
+
"site"
|
|
3488
|
+
]
|
|
3489
|
+
}
|
|
3490
|
+
],
|
|
3491
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
3492
|
+
},
|
|
3476
3493
|
"client_id": {
|
|
3477
3494
|
"type": "string",
|
|
3478
3495
|
"description": "Client ID of the form that asked for it."
|
|
3496
|
+
},
|
|
3497
|
+
"site_id": {
|
|
3498
|
+
"type": "string",
|
|
3499
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
3500
|
+
},
|
|
3501
|
+
"hostname": {
|
|
3502
|
+
"type": "string",
|
|
3503
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
3504
|
+
},
|
|
3505
|
+
"action": {
|
|
3506
|
+
"type": "string",
|
|
3507
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
3508
|
+
"nullable": true
|
|
3479
3509
|
}
|
|
3480
3510
|
},
|
|
3481
3511
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -3937,6 +3967,16 @@
|
|
|
3937
3967
|
"properties": {},
|
|
3938
3968
|
"additionalProperties": true,
|
|
3939
3969
|
"description": "App Metadata"
|
|
3970
|
+
},
|
|
3971
|
+
"challenge_token": {
|
|
3972
|
+
"type": "string",
|
|
3973
|
+
"maxLength": 200,
|
|
3974
|
+
"description": "Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`."
|
|
3975
|
+
},
|
|
3976
|
+
"challenge_receipt": {
|
|
3977
|
+
"type": "string",
|
|
3978
|
+
"maxLength": 4096,
|
|
3979
|
+
"description": "The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`."
|
|
3940
3980
|
}
|
|
3941
3981
|
},
|
|
3942
3982
|
"description": "UserCreate",
|
|
@@ -4022,6 +4062,16 @@
|
|
|
4022
4062
|
"properties": {},
|
|
4023
4063
|
"additionalProperties": true,
|
|
4024
4064
|
"description": "App defined metadata"
|
|
4065
|
+
},
|
|
4066
|
+
"challenge_token": {
|
|
4067
|
+
"type": "string",
|
|
4068
|
+
"maxLength": 200,
|
|
4069
|
+
"description": "Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`."
|
|
4070
|
+
},
|
|
4071
|
+
"challenge_receipt": {
|
|
4072
|
+
"type": "string",
|
|
4073
|
+
"maxLength": 4096,
|
|
4074
|
+
"description": "The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`."
|
|
4025
4075
|
}
|
|
4026
4076
|
},
|
|
4027
4077
|
"description": "UserUpdate",
|
|
@@ -9991,7 +10041,7 @@
|
|
|
9991
10041
|
},
|
|
9992
10042
|
"ErrorCode": {
|
|
9993
10043
|
"type": "string",
|
|
9994
|
-
"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.",
|
|
10044
|
+
"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- `challenge_unavailable` (503): Faable Challenge could not verify the `challenge_token` sent with this user (it did not answer). Nothing was written: retry the request.\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- `phone_verified` (409): The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error.\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.",
|
|
9995
10045
|
"enum": [
|
|
9996
10046
|
"bad_request",
|
|
9997
10047
|
"validation_error",
|
|
@@ -10034,6 +10084,7 @@
|
|
|
10034
10084
|
"challenge_required",
|
|
10035
10085
|
"challenge_invalid",
|
|
10036
10086
|
"challenge_unsupported",
|
|
10087
|
+
"challenge_unavailable",
|
|
10037
10088
|
"origin_required",
|
|
10038
10089
|
"client_credentials_denied",
|
|
10039
10090
|
"m2m_quota_exceeded",
|
|
@@ -10052,6 +10103,7 @@
|
|
|
10052
10103
|
"invalid_phone",
|
|
10053
10104
|
"phone_changed",
|
|
10054
10105
|
"phone_already_verified",
|
|
10106
|
+
"phone_verified",
|
|
10055
10107
|
"sms_unavailable",
|
|
10056
10108
|
"sms_failed",
|
|
10057
10109
|
"invalid_state",
|
|
@@ -27241,6 +27293,16 @@
|
|
|
27241
27293
|
"properties": {},
|
|
27242
27294
|
"additionalProperties": true,
|
|
27243
27295
|
"description": "App Metadata"
|
|
27296
|
+
},
|
|
27297
|
+
"challenge_token": {
|
|
27298
|
+
"type": "string",
|
|
27299
|
+
"maxLength": 200,
|
|
27300
|
+
"description": "Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`."
|
|
27301
|
+
},
|
|
27302
|
+
"challenge_receipt": {
|
|
27303
|
+
"type": "string",
|
|
27304
|
+
"maxLength": 4096,
|
|
27305
|
+
"description": "The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`."
|
|
27244
27306
|
}
|
|
27245
27307
|
},
|
|
27246
27308
|
"description": "UserCreate",
|
|
@@ -27386,7 +27448,7 @@
|
|
|
27386
27448
|
},
|
|
27387
27449
|
"challenge_passed_at": {
|
|
27388
27450
|
"type": "string",
|
|
27389
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
27451
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
27390
27452
|
"nullable": true
|
|
27391
27453
|
},
|
|
27392
27454
|
"challenge_passed": {
|
|
@@ -27404,9 +27466,39 @@
|
|
|
27404
27466
|
"type": "number",
|
|
27405
27467
|
"description": "Leading zero bits the proof had to reach."
|
|
27406
27468
|
},
|
|
27469
|
+
"source": {
|
|
27470
|
+
"anyOf": [
|
|
27471
|
+
{
|
|
27472
|
+
"type": "string",
|
|
27473
|
+
"enum": [
|
|
27474
|
+
"auth"
|
|
27475
|
+
]
|
|
27476
|
+
},
|
|
27477
|
+
{
|
|
27478
|
+
"type": "string",
|
|
27479
|
+
"enum": [
|
|
27480
|
+
"site"
|
|
27481
|
+
]
|
|
27482
|
+
}
|
|
27483
|
+
],
|
|
27484
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
27485
|
+
},
|
|
27407
27486
|
"client_id": {
|
|
27408
27487
|
"type": "string",
|
|
27409
27488
|
"description": "Client ID of the form that asked for it."
|
|
27489
|
+
},
|
|
27490
|
+
"site_id": {
|
|
27491
|
+
"type": "string",
|
|
27492
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
27493
|
+
},
|
|
27494
|
+
"hostname": {
|
|
27495
|
+
"type": "string",
|
|
27496
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
27497
|
+
},
|
|
27498
|
+
"action": {
|
|
27499
|
+
"type": "string",
|
|
27500
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
27501
|
+
"nullable": true
|
|
27410
27502
|
}
|
|
27411
27503
|
},
|
|
27412
27504
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -28081,7 +28173,7 @@
|
|
|
28081
28173
|
},
|
|
28082
28174
|
"challenge_passed_at": {
|
|
28083
28175
|
"type": "string",
|
|
28084
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
28176
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
28085
28177
|
"nullable": true
|
|
28086
28178
|
},
|
|
28087
28179
|
"challenge_passed": {
|
|
@@ -28099,9 +28191,39 @@
|
|
|
28099
28191
|
"type": "number",
|
|
28100
28192
|
"description": "Leading zero bits the proof had to reach."
|
|
28101
28193
|
},
|
|
28194
|
+
"source": {
|
|
28195
|
+
"anyOf": [
|
|
28196
|
+
{
|
|
28197
|
+
"type": "string",
|
|
28198
|
+
"enum": [
|
|
28199
|
+
"auth"
|
|
28200
|
+
]
|
|
28201
|
+
},
|
|
28202
|
+
{
|
|
28203
|
+
"type": "string",
|
|
28204
|
+
"enum": [
|
|
28205
|
+
"site"
|
|
28206
|
+
]
|
|
28207
|
+
}
|
|
28208
|
+
],
|
|
28209
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
28210
|
+
},
|
|
28102
28211
|
"client_id": {
|
|
28103
28212
|
"type": "string",
|
|
28104
28213
|
"description": "Client ID of the form that asked for it."
|
|
28214
|
+
},
|
|
28215
|
+
"site_id": {
|
|
28216
|
+
"type": "string",
|
|
28217
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
28218
|
+
},
|
|
28219
|
+
"hostname": {
|
|
28220
|
+
"type": "string",
|
|
28221
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
28222
|
+
},
|
|
28223
|
+
"action": {
|
|
28224
|
+
"type": "string",
|
|
28225
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
28226
|
+
"nullable": true
|
|
28105
28227
|
}
|
|
28106
28228
|
},
|
|
28107
28229
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -28700,6 +28822,16 @@
|
|
|
28700
28822
|
"properties": {},
|
|
28701
28823
|
"additionalProperties": true,
|
|
28702
28824
|
"description": "App defined metadata"
|
|
28825
|
+
},
|
|
28826
|
+
"challenge_token": {
|
|
28827
|
+
"type": "string",
|
|
28828
|
+
"maxLength": 200,
|
|
28829
|
+
"description": "Faable Challenge response token (`fct_…`) from the form that sent this user, NOT yet verified by your backend. Faable Auth verifies it (single use, only for sites of this project) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_receipt`."
|
|
28830
|
+
},
|
|
28831
|
+
"challenge_receipt": {
|
|
28832
|
+
"type": "string",
|
|
28833
|
+
"maxLength": 4096,
|
|
28834
|
+
"description": "The `receipt` that Faable Challenge `/v1/verify` returned to your backend: proof that the form passed, for a token you already verified. Faable Auth checks its signature, project and expiry (10 min, single use) and records it in `challenge_passed`. Invalid → 400 `challenge_invalid` and nothing is written. Not with `challenge_token`."
|
|
28703
28835
|
}
|
|
28704
28836
|
},
|
|
28705
28837
|
"description": "UserUpdate",
|
|
@@ -28855,7 +28987,7 @@
|
|
|
28855
28987
|
},
|
|
28856
28988
|
"challenge_passed_at": {
|
|
28857
28989
|
"type": "string",
|
|
28858
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
28990
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
28859
28991
|
"nullable": true
|
|
28860
28992
|
},
|
|
28861
28993
|
"challenge_passed": {
|
|
@@ -28873,9 +29005,39 @@
|
|
|
28873
29005
|
"type": "number",
|
|
28874
29006
|
"description": "Leading zero bits the proof had to reach."
|
|
28875
29007
|
},
|
|
29008
|
+
"source": {
|
|
29009
|
+
"anyOf": [
|
|
29010
|
+
{
|
|
29011
|
+
"type": "string",
|
|
29012
|
+
"enum": [
|
|
29013
|
+
"auth"
|
|
29014
|
+
]
|
|
29015
|
+
},
|
|
29016
|
+
{
|
|
29017
|
+
"type": "string",
|
|
29018
|
+
"enum": [
|
|
29019
|
+
"site"
|
|
29020
|
+
]
|
|
29021
|
+
}
|
|
29022
|
+
],
|
|
29023
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
29024
|
+
},
|
|
28876
29025
|
"client_id": {
|
|
28877
29026
|
"type": "string",
|
|
28878
29027
|
"description": "Client ID of the form that asked for it."
|
|
29028
|
+
},
|
|
29029
|
+
"site_id": {
|
|
29030
|
+
"type": "string",
|
|
29031
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
29032
|
+
},
|
|
29033
|
+
"hostname": {
|
|
29034
|
+
"type": "string",
|
|
29035
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
29036
|
+
},
|
|
29037
|
+
"action": {
|
|
29038
|
+
"type": "string",
|
|
29039
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
29040
|
+
"nullable": true
|
|
28879
29041
|
}
|
|
28880
29042
|
},
|
|
28881
29043
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -29550,7 +29712,7 @@
|
|
|
29550
29712
|
},
|
|
29551
29713
|
"challenge_passed_at": {
|
|
29552
29714
|
"type": "string",
|
|
29553
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
29715
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
29554
29716
|
"nullable": true
|
|
29555
29717
|
},
|
|
29556
29718
|
"challenge_passed": {
|
|
@@ -29568,9 +29730,39 @@
|
|
|
29568
29730
|
"type": "number",
|
|
29569
29731
|
"description": "Leading zero bits the proof had to reach."
|
|
29570
29732
|
},
|
|
29733
|
+
"source": {
|
|
29734
|
+
"anyOf": [
|
|
29735
|
+
{
|
|
29736
|
+
"type": "string",
|
|
29737
|
+
"enum": [
|
|
29738
|
+
"auth"
|
|
29739
|
+
]
|
|
29740
|
+
},
|
|
29741
|
+
{
|
|
29742
|
+
"type": "string",
|
|
29743
|
+
"enum": [
|
|
29744
|
+
"site"
|
|
29745
|
+
]
|
|
29746
|
+
}
|
|
29747
|
+
],
|
|
29748
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
29749
|
+
},
|
|
29571
29750
|
"client_id": {
|
|
29572
29751
|
"type": "string",
|
|
29573
29752
|
"description": "Client ID of the form that asked for it."
|
|
29753
|
+
},
|
|
29754
|
+
"site_id": {
|
|
29755
|
+
"type": "string",
|
|
29756
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
29757
|
+
},
|
|
29758
|
+
"hostname": {
|
|
29759
|
+
"type": "string",
|
|
29760
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
29761
|
+
},
|
|
29762
|
+
"action": {
|
|
29763
|
+
"type": "string",
|
|
29764
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
29765
|
+
"nullable": true
|
|
29574
29766
|
}
|
|
29575
29767
|
},
|
|
29576
29768
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -74320,7 +74512,7 @@
|
|
|
74320
74512
|
},
|
|
74321
74513
|
"challenge_passed_at": {
|
|
74322
74514
|
"type": "string",
|
|
74323
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
74515
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
74324
74516
|
"nullable": true
|
|
74325
74517
|
},
|
|
74326
74518
|
"challenge_passed": {
|
|
@@ -74338,9 +74530,39 @@
|
|
|
74338
74530
|
"type": "number",
|
|
74339
74531
|
"description": "Leading zero bits the proof had to reach."
|
|
74340
74532
|
},
|
|
74533
|
+
"source": {
|
|
74534
|
+
"anyOf": [
|
|
74535
|
+
{
|
|
74536
|
+
"type": "string",
|
|
74537
|
+
"enum": [
|
|
74538
|
+
"auth"
|
|
74539
|
+
]
|
|
74540
|
+
},
|
|
74541
|
+
{
|
|
74542
|
+
"type": "string",
|
|
74543
|
+
"enum": [
|
|
74544
|
+
"site"
|
|
74545
|
+
]
|
|
74546
|
+
}
|
|
74547
|
+
],
|
|
74548
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
74549
|
+
},
|
|
74341
74550
|
"client_id": {
|
|
74342
74551
|
"type": "string",
|
|
74343
74552
|
"description": "Client ID of the form that asked for it."
|
|
74553
|
+
},
|
|
74554
|
+
"site_id": {
|
|
74555
|
+
"type": "string",
|
|
74556
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
74557
|
+
},
|
|
74558
|
+
"hostname": {
|
|
74559
|
+
"type": "string",
|
|
74560
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
74561
|
+
},
|
|
74562
|
+
"action": {
|
|
74563
|
+
"type": "string",
|
|
74564
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
74565
|
+
"nullable": true
|
|
74344
74566
|
}
|
|
74345
74567
|
},
|
|
74346
74568
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -74838,7 +75060,7 @@
|
|
|
74838
75060
|
"tags": [
|
|
74839
75061
|
"session"
|
|
74840
75062
|
],
|
|
74841
|
-
"description": "Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso` and the custom `fields` the application declares (`profile_fields`) can be changed; `company_name` and `fields` are merged into `user_metadata` without touching its other keys. A Bearer token must belong to this Account.",
|
|
75063
|
+
"description": "Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso`, `phone` and the custom `fields` the application declares (`profile_fields`) can be changed; `company_name` and `fields` are merged into `user_metadata` without touching its other keys. `phone` is normalised to E.164 with the account default country (400 `invalid_phone` if it does not normalise, and nothing is written); a verified phone can only be changed through `POST /user/:id/verify-phone/start`, so a different number (or `null`) answers 409 `phone_verified`. A Bearer token must belong to this Account.",
|
|
74842
75064
|
"requestBody": {
|
|
74843
75065
|
"required": true,
|
|
74844
75066
|
"content": {
|
|
@@ -74859,6 +75081,12 @@
|
|
|
74859
75081
|
"type": "string",
|
|
74860
75082
|
"maxLength": 3
|
|
74861
75083
|
},
|
|
75084
|
+
"phone": {
|
|
75085
|
+
"type": "string",
|
|
75086
|
+
"maxLength": 40,
|
|
75087
|
+
"description": "The phone number, `null` to remove it. Normalised to E.164 with the account default country (`636 123 456` → `+34636123456`); one that does not normalise fails with 400 `invalid_phone`. A verified phone cannot be changed or removed here (409 `phone_verified`): use `POST /user/:id/verify-phone/start`. Changing an unverified phone leaves `phone_verified: false`.",
|
|
75088
|
+
"nullable": true
|
|
75089
|
+
},
|
|
74862
75090
|
"fields": {
|
|
74863
75091
|
"type": "array",
|
|
74864
75092
|
"items": {
|
|
@@ -75023,7 +75251,7 @@
|
|
|
75023
75251
|
},
|
|
75024
75252
|
"challenge_passed_at": {
|
|
75025
75253
|
"type": "string",
|
|
75026
|
-
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed on a signup or passwordless code
|
|
75254
|
+
"description": "ISO 8601 timestamp of the last bot-protection challenge (proof of work) this user passed: on a Faable Auth signup or passwordless code, or on a form of your own protected by Faable Challenge (sent as `challenge_token` / `challenge_receipt` with the management API). Absent when they never passed one.",
|
|
75027
75255
|
"nullable": true
|
|
75028
75256
|
},
|
|
75029
75257
|
"challenge_passed": {
|
|
@@ -75041,9 +75269,39 @@
|
|
|
75041
75269
|
"type": "number",
|
|
75042
75270
|
"description": "Leading zero bits the proof had to reach."
|
|
75043
75271
|
},
|
|
75272
|
+
"source": {
|
|
75273
|
+
"anyOf": [
|
|
75274
|
+
{
|
|
75275
|
+
"type": "string",
|
|
75276
|
+
"enum": [
|
|
75277
|
+
"auth"
|
|
75278
|
+
]
|
|
75279
|
+
},
|
|
75280
|
+
{
|
|
75281
|
+
"type": "string",
|
|
75282
|
+
"enum": [
|
|
75283
|
+
"site"
|
|
75284
|
+
]
|
|
75285
|
+
}
|
|
75286
|
+
],
|
|
75287
|
+
"description": "`auth`: a Faable Auth signup or passwordless code. `site`: a form of your own protected by Faable Challenge, proved with `challenge_token` or `challenge_receipt` when the user was created or updated through the management API."
|
|
75288
|
+
},
|
|
75044
75289
|
"client_id": {
|
|
75045
75290
|
"type": "string",
|
|
75046
75291
|
"description": "Client ID of the form that asked for it."
|
|
75292
|
+
},
|
|
75293
|
+
"site_id": {
|
|
75294
|
+
"type": "string",
|
|
75295
|
+
"description": "Faable Challenge site (`source: site`)."
|
|
75296
|
+
},
|
|
75297
|
+
"hostname": {
|
|
75298
|
+
"type": "string",
|
|
75299
|
+
"description": "Hostname of the page where it was solved (`source: site`)."
|
|
75300
|
+
},
|
|
75301
|
+
"action": {
|
|
75302
|
+
"type": "string",
|
|
75303
|
+
"description": "The action label of the form (`booking`, `contact`…), `source: site`.",
|
|
75304
|
+
"nullable": true
|
|
75047
75305
|
}
|
|
75048
75306
|
},
|
|
75049
75307
|
"description": "Details of `challenge_passed_at`."
|
|
@@ -75408,7 +75666,7 @@
|
|
|
75408
75666
|
}
|
|
75409
75667
|
},
|
|
75410
75668
|
"400": {
|
|
75411
|
-
"description": "`bad_request` — The request is malformed. `message` says what is wrong.\n\n`invalid_profile_field` — A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
75669
|
+
"description": "`bad_request` — The request is malformed. `message` says what is wrong.\n\n`invalid_profile_field` — A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.\n\n`invalid_phone` — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
75412
75670
|
"content": {
|
|
75413
75671
|
"application/json": {
|
|
75414
75672
|
"schema": {
|
|
@@ -75424,6 +75682,7 @@
|
|
|
75424
75682
|
"enum": [
|
|
75425
75683
|
"bad_request",
|
|
75426
75684
|
"invalid_profile_field",
|
|
75685
|
+
"invalid_phone",
|
|
75427
75686
|
"validation_error"
|
|
75428
75687
|
]
|
|
75429
75688
|
}
|
|
@@ -75510,6 +75769,31 @@
|
|
|
75510
75769
|
}
|
|
75511
75770
|
}
|
|
75512
75771
|
},
|
|
75772
|
+
"409": {
|
|
75773
|
+
"description": "`phone_verified` — The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error.",
|
|
75774
|
+
"content": {
|
|
75775
|
+
"application/json": {
|
|
75776
|
+
"schema": {
|
|
75777
|
+
"allOf": [
|
|
75778
|
+
{
|
|
75779
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
75780
|
+
},
|
|
75781
|
+
{
|
|
75782
|
+
"type": "object",
|
|
75783
|
+
"properties": {
|
|
75784
|
+
"error_code": {
|
|
75785
|
+
"type": "string",
|
|
75786
|
+
"enum": [
|
|
75787
|
+
"phone_verified"
|
|
75788
|
+
]
|
|
75789
|
+
}
|
|
75790
|
+
}
|
|
75791
|
+
}
|
|
75792
|
+
]
|
|
75793
|
+
}
|
|
75794
|
+
}
|
|
75795
|
+
}
|
|
75796
|
+
},
|
|
75513
75797
|
"429": {
|
|
75514
75798
|
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
75515
75799
|
"content": {
|