@faable/auth-sdk 2.7.70 → 2.7.72

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.
@@ -2005,6 +2005,26 @@ export interface paths {
2005
2005
  patch?: never;
2006
2006
  trace?: never;
2007
2007
  };
2008
+ "/sdk/report": {
2009
+ parameters: {
2010
+ query?: never;
2011
+ header?: never;
2012
+ path?: never;
2013
+ cookie?: never;
2014
+ };
2015
+ get?: never;
2016
+ put?: never;
2017
+ /**
2018
+ * Report a client-side sign-in failure
2019
+ * @description Called by the browser SDKs when a sign-in redirect could not be completed on the client (the code exchange stalled or had no PKCE verifier). The server only logs it; nothing is stored and the response is always empty.
2020
+ */
2021
+ post: operations["sdk/report"];
2022
+ delete?: never;
2023
+ options?: never;
2024
+ head?: never;
2025
+ patch?: never;
2026
+ trace?: never;
2027
+ };
2008
2028
  "/passwordless/verify_redirect": {
2009
2029
  parameters: {
2010
2030
  query?: never;
@@ -26604,6 +26624,85 @@ export interface operations {
26604
26624
  };
26605
26625
  };
26606
26626
  };
26627
+ "sdk/report": {
26628
+ parameters: {
26629
+ query?: never;
26630
+ header?: never;
26631
+ path?: never;
26632
+ cookie?: never;
26633
+ };
26634
+ requestBody: {
26635
+ content: {
26636
+ "application/json": {
26637
+ client_id: string;
26638
+ event: "callback_stalled" | "callback_no_verifier" | "callback_recovered";
26639
+ /** @description Last step the SDK reached before reporting (`detected`, `verifier_loaded`, `token_request_sent`, `token_response`…). */
26640
+ stage?: string;
26641
+ elapsed_ms?: number;
26642
+ /** @description First characters of the authorization code, to join the report with the `Generated code=` and `/oauth/token` lines of the same sign-in. */
26643
+ code_prefix?: string;
26644
+ detail?: string;
26645
+ };
26646
+ };
26647
+ };
26648
+ responses: {
26649
+ /** @description Default Response */
26650
+ 204: {
26651
+ headers: {
26652
+ [name: string]: unknown;
26653
+ };
26654
+ content?: never;
26655
+ };
26656
+ /** @description `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field. */
26657
+ 400: {
26658
+ headers: {
26659
+ [name: string]: unknown;
26660
+ };
26661
+ content: {
26662
+ "application/json": components["schemas"]["ErrorResponse"] & {
26663
+ /** @enum {string} */
26664
+ error_code?: "validation_error";
26665
+ };
26666
+ };
26667
+ };
26668
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
26669
+ 404: {
26670
+ headers: {
26671
+ [name: string]: unknown;
26672
+ };
26673
+ content: {
26674
+ "application/json": components["schemas"]["ErrorResponse"] & {
26675
+ /** @enum {string} */
26676
+ error_code?: "account_not_found";
26677
+ };
26678
+ };
26679
+ };
26680
+ /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
26681
+ 429: {
26682
+ headers: {
26683
+ [name: string]: unknown;
26684
+ };
26685
+ content: {
26686
+ "application/json": components["schemas"]["ErrorResponse"] & {
26687
+ /** @enum {string} */
26688
+ error_code?: "too_many_requests";
26689
+ };
26690
+ };
26691
+ };
26692
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
26693
+ 500: {
26694
+ headers: {
26695
+ [name: string]: unknown;
26696
+ };
26697
+ content: {
26698
+ "application/json": components["schemas"]["ErrorResponse"] & {
26699
+ /** @enum {string} */
26700
+ error_code?: "internal_error";
26701
+ };
26702
+ };
26703
+ };
26704
+ };
26705
+ };
26607
26706
  "passwordless/verify_redirect": {
26608
26707
  parameters: {
26609
26708
  query: {
package/dist/version.js CHANGED
@@ -9,13 +9,13 @@
9
9
  // login pages could not import the SDK at all. Same pattern as auth-js.
10
10
  //
11
11
  // The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
12
- export const version = "2.7.70";
12
+ export const version = "2.7.72";
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 = "44a74c7";
18
+ export const commit = "6edf3a1";
19
19
  // What this SDK writes in `x-faable-client`. Exported for a consumer that
20
20
  // builds a strategy on its own (outside `FaableAuthApi`) and still wants the
21
21
  // token request attributed — a bare `authClientCredentials` stamps only what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.7.70",
3
+ "version": "2.7.72",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "2.57.0",
6
+ "version": "2.59.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -54746,6 +54746,184 @@
54746
54746
  }
54747
54747
  }
54748
54748
  },
54749
+ "/sdk/report": {
54750
+ "post": {
54751
+ "operationId": "sdk/report",
54752
+ "summary": "Report a client-side sign-in failure",
54753
+ "tags": [
54754
+ "sdk"
54755
+ ],
54756
+ "description": "Called by the browser SDKs when a sign-in redirect could not be completed on the client (the code exchange stalled or had no PKCE verifier). The server only logs it; nothing is stored and the response is always empty.",
54757
+ "requestBody": {
54758
+ "required": true,
54759
+ "content": {
54760
+ "application/json": {
54761
+ "schema": {
54762
+ "type": "object",
54763
+ "required": [
54764
+ "client_id",
54765
+ "event"
54766
+ ],
54767
+ "properties": {
54768
+ "client_id": {
54769
+ "type": "string",
54770
+ "minLength": 1,
54771
+ "maxLength": 128
54772
+ },
54773
+ "event": {
54774
+ "anyOf": [
54775
+ {
54776
+ "type": "string",
54777
+ "enum": [
54778
+ "callback_stalled"
54779
+ ]
54780
+ },
54781
+ {
54782
+ "type": "string",
54783
+ "enum": [
54784
+ "callback_no_verifier"
54785
+ ]
54786
+ },
54787
+ {
54788
+ "type": "string",
54789
+ "enum": [
54790
+ "callback_recovered"
54791
+ ]
54792
+ }
54793
+ ]
54794
+ },
54795
+ "stage": {
54796
+ "type": "string",
54797
+ "maxLength": 64,
54798
+ "description": "Last step the SDK reached before reporting (`detected`, `verifier_loaded`, `token_request_sent`, `token_response`…)."
54799
+ },
54800
+ "elapsed_ms": {
54801
+ "type": "integer",
54802
+ "minimum": 0,
54803
+ "maximum": 3600000
54804
+ },
54805
+ "code_prefix": {
54806
+ "type": "string",
54807
+ "pattern": "^[0-9a-f-]{1,8}$",
54808
+ "description": "First characters of the authorization code, to join the report with the `Generated code=` and `/oauth/token` lines of the same sign-in."
54809
+ },
54810
+ "detail": {
54811
+ "type": "string",
54812
+ "maxLength": 500
54813
+ }
54814
+ },
54815
+ "additionalProperties": false
54816
+ }
54817
+ }
54818
+ }
54819
+ },
54820
+ "responses": {
54821
+ "204": {
54822
+ "description": "Default Response"
54823
+ },
54824
+ "400": {
54825
+ "description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
54826
+ "content": {
54827
+ "application/json": {
54828
+ "schema": {
54829
+ "allOf": [
54830
+ {
54831
+ "$ref": "#/components/schemas/ErrorResponse"
54832
+ },
54833
+ {
54834
+ "type": "object",
54835
+ "properties": {
54836
+ "error_code": {
54837
+ "type": "string",
54838
+ "enum": [
54839
+ "validation_error"
54840
+ ]
54841
+ }
54842
+ }
54843
+ }
54844
+ ]
54845
+ }
54846
+ }
54847
+ }
54848
+ },
54849
+ "404": {
54850
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
54851
+ "content": {
54852
+ "application/json": {
54853
+ "schema": {
54854
+ "allOf": [
54855
+ {
54856
+ "$ref": "#/components/schemas/ErrorResponse"
54857
+ },
54858
+ {
54859
+ "type": "object",
54860
+ "properties": {
54861
+ "error_code": {
54862
+ "type": "string",
54863
+ "enum": [
54864
+ "account_not_found"
54865
+ ]
54866
+ }
54867
+ }
54868
+ }
54869
+ ]
54870
+ }
54871
+ }
54872
+ }
54873
+ },
54874
+ "429": {
54875
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
54876
+ "content": {
54877
+ "application/json": {
54878
+ "schema": {
54879
+ "allOf": [
54880
+ {
54881
+ "$ref": "#/components/schemas/ErrorResponse"
54882
+ },
54883
+ {
54884
+ "type": "object",
54885
+ "properties": {
54886
+ "error_code": {
54887
+ "type": "string",
54888
+ "enum": [
54889
+ "too_many_requests"
54890
+ ]
54891
+ }
54892
+ }
54893
+ }
54894
+ ]
54895
+ }
54896
+ }
54897
+ }
54898
+ },
54899
+ "500": {
54900
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
54901
+ "content": {
54902
+ "application/json": {
54903
+ "schema": {
54904
+ "allOf": [
54905
+ {
54906
+ "$ref": "#/components/schemas/ErrorResponse"
54907
+ },
54908
+ {
54909
+ "type": "object",
54910
+ "properties": {
54911
+ "error_code": {
54912
+ "type": "string",
54913
+ "enum": [
54914
+ "internal_error"
54915
+ ]
54916
+ }
54917
+ }
54918
+ }
54919
+ ]
54920
+ }
54921
+ }
54922
+ }
54923
+ }
54924
+ }
54925
+ }
54926
+ },
54749
54927
  "/passwordless/verify_redirect": {
54750
54928
  "get": {
54751
54929
  "operationId": "passwordless/verify_redirect",