@passflow/react 0.19.0 → 0.20.0

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.es.js +135 -143
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
  7. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
  8. package/dist/src/components/flow/two-factor-verify/index.d.cts +0 -2
  9. package/dist/src/components/flow/two-factor-verify/index.d.ts +0 -2
  10. package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
  11. package/dist/src/components/flow/two-factor-verify/screen.d.cts +5 -0
  12. package/dist/src/components/flow/two-factor-verify/screen.d.ts +5 -0
  13. package/dist/src/components/flow/two-factor-verify/screen.d.ts.map +1 -0
  14. package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
  15. package/dist/src/components/form/signin/index.d.ts.map +1 -1
  16. package/dist/src/components/form/signup/index.d.ts.map +1 -1
  17. package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
  18. package/dist/src/components/form/two-factor-setup/setup-screen.d.cts +29 -0
  19. package/dist/src/components/form/two-factor-setup/setup-screen.d.ts +29 -0
  20. package/dist/src/components/form/two-factor-setup/setup-screen.d.ts.map +1 -0
  21. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +3 -0
  22. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +3 -0
  23. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
  24. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +5 -2
  25. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +5 -2
  26. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
  27. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +5 -3
  28. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +5 -3
  29. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
  30. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
  31. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
  32. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
  33. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  34. package/dist/src/components/ui/login-screen/index.d.cts +1 -1
  35. package/dist/src/components/ui/login-screen/index.d.ts +1 -1
  36. package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
  37. package/dist/src/components/ui/login-screen/login-screen.d.ts.map +1 -1
  38. package/dist/src/components/ui/login-screen/shared.d.cts +4 -0
  39. package/dist/src/components/ui/login-screen/shared.d.ts +4 -0
  40. package/dist/src/components/ui/login-screen/shared.d.ts.map +1 -1
  41. package/dist/src/components/ui/login-screen/status.d.ts.map +1 -1
  42. package/dist/src/components/ui/login-screen/two-factor-code.d.cts +8 -0
  43. package/dist/src/components/ui/login-screen/two-factor-code.d.ts +8 -0
  44. package/dist/src/components/ui/login-screen/two-factor-code.d.ts.map +1 -0
  45. package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.cts +5 -0
  46. package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts +5 -0
  47. package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts.map +1 -0
  48. package/dist/src/components/ui/login-screen/two-factor-setup.d.cts +4 -0
  49. package/dist/src/components/ui/login-screen/two-factor-setup.d.ts +4 -0
  50. package/dist/src/components/ui/login-screen/two-factor-setup.d.ts.map +1 -0
  51. package/dist/src/components/ui/login-screen/types.d.cts +115 -6
  52. package/dist/src/components/ui/login-screen/types.d.ts +115 -6
  53. package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
  54. package/dist/src/hooks/use-two-factor-enrollment.d.cts +58 -0
  55. package/dist/src/hooks/use-two-factor-enrollment.d.ts +58 -0
  56. package/dist/src/hooks/use-two-factor-enrollment.d.ts.map +1 -0
  57. package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +5 -15
  58. package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts +5 -15
  59. package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
  60. package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -1
  61. package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
  62. package/dist/src/types/two-factor-errors.d.cts +1 -2
  63. package/dist/src/types/two-factor-errors.d.ts +1 -2
  64. package/dist/src/types/two-factor-errors.d.ts.map +1 -1
  65. package/dist/src/utils/auth-error.d.cts +23 -0
  66. package/dist/src/utils/auth-error.d.ts +23 -0
  67. package/dist/src/utils/auth-error.d.ts.map +1 -1
  68. package/dist/src/utils/classify-two-factor-error.d.cts +5 -6
  69. package/dist/src/utils/classify-two-factor-error.d.ts +5 -6
  70. package/dist/src/utils/classify-two-factor-error.d.ts.map +1 -1
  71. package/dist/src/utils/index.d.cts +3 -3
  72. package/dist/src/utils/index.d.ts +3 -3
  73. package/dist/src/utils/index.d.ts.map +1 -1
  74. package/dist/src/utils/second-factor.d.cts +7 -1
  75. package/dist/src/utils/second-factor.d.ts +7 -1
  76. package/dist/src/utils/second-factor.d.ts.map +1 -1
  77. package/dist/style.css +1 -1
  78. package/package.json +2 -2
@@ -182,6 +182,108 @@ export type LoginSecondFactorState = {
182
182
  /** Called when the user switches factor, so a stale error can be cleared. */
183
183
  onMethodChange?: () => void;
184
184
  };
185
+ /** Which factor `two-factor-code` asks for: authenticator boxes, or a recovery code field. */
186
+ export type LoginTwoFactorCodeFactor = {
187
+ type: 'totp';
188
+ digits: number;
189
+ } | {
190
+ type: 'recovery';
191
+ placeholder?: string;
192
+ };
193
+ /** The line under the code. `error` marks the code invalid; `info` does not. */
194
+ export type LoginTwoFactorCodeAlert = {
195
+ message: string;
196
+ tone: 'error' | 'info';
197
+ };
198
+ /** The "trust this device" option. */
199
+ export type LoginTwoFactorTrustDevice = {
200
+ label: string;
201
+ checked: boolean;
202
+ onChange: (checked: boolean) => void;
203
+ };
204
+ /** The other factor: `prompt` is a sentence, `label` the link that follows it. */
205
+ export type LoginTwoFactorCodeAlternate = {
206
+ prompt: string;
207
+ label: string;
208
+ onClick: () => void;
209
+ };
210
+ /** Code entry at sign-in, for the verify and recovery forms. The code is controlled and all copy comes through props. */
211
+ export type LoginTwoFactorCodeState = {
212
+ kind: 'two-factor-code';
213
+ factor: LoginTwoFactorCodeFactor;
214
+ /** Names the code field. */
215
+ label: string;
216
+ code: string;
217
+ trustDevice: LoginTwoFactorTrustDevice;
218
+ /** A check is in flight: the code, the switch and every action are locked, and Verify shows `busyLabel`. */
219
+ busy?: boolean;
220
+ canSubmit: boolean;
221
+ /** No further code can be taken: the code and the switch are disabled, and Verify and `alternate` are gone. */
222
+ locked?: boolean;
223
+ alert?: LoginTwoFactorCodeAlert;
224
+ submitLabel: string;
225
+ busyLabel: string;
226
+ alternate?: LoginTwoFactorCodeAlternate;
227
+ /** The way out. It stays when `locked`. */
228
+ secondaryAction?: LoginScreenAction;
229
+ autoFocus?: boolean;
230
+ testId?: string;
231
+ onCodeChange: (code: string) => void;
232
+ onSubmit: () => void;
233
+ };
234
+ /** Enrolment before anything was requested from the server. */
235
+ export type LoginTwoFactorSetupStartState = {
236
+ kind: 'two-factor-setup';
237
+ step: 'start';
238
+ startLabel: string;
239
+ busyLabel: string;
240
+ busy?: boolean;
241
+ error?: string | null;
242
+ secondaryAction?: LoginScreenAction;
243
+ testId?: string;
244
+ onStart: () => void;
245
+ };
246
+ /** Enrolment with a secret: scan it or type it, then confirm a code. A new `secret` clears the typed code. */
247
+ export type LoginTwoFactorSetupCodeState = {
248
+ kind: 'two-factor-setup';
249
+ step: 'code';
250
+ /** Bare base64 PNG. When empty, no image shows and the secret is always visible. */
251
+ qrCode: string;
252
+ qrAlt: string;
253
+ secret: string;
254
+ /** Introduces the secret wherever it is visible. */
255
+ secretLabel: string;
256
+ showSecretLabel: string;
257
+ hideSecretLabel: string;
258
+ /** Digits in the code, from the server's `totp_digits`. */
259
+ digits: number;
260
+ /** Names the code field. */
261
+ codeLabel: string;
262
+ submitLabel: string;
263
+ busyLabel: string;
264
+ busy?: boolean;
265
+ alert?: LoginTwoFactorCodeAlert;
266
+ secondaryAction?: LoginScreenAction;
267
+ testId?: string;
268
+ onSubmit: (code: string) => void;
269
+ };
270
+ export type LoginTwoFactorSetupState = LoginTwoFactorSetupStartState | LoginTwoFactorSetupCodeState;
271
+ /** The recovery codes, shown once after enrolment. */
272
+ export type LoginTwoFactorRecoveryCodesState = {
273
+ kind: 'two-factor-recovery-codes';
274
+ /** That the codes will not be shown again. */
275
+ warning: string;
276
+ codes: string[];
277
+ copyLabel: string;
278
+ continueLabel: string;
279
+ busyLabel: string;
280
+ /** `onContinue` is in flight: Continue is locked, the codes can still be copied. */
281
+ busy?: boolean;
282
+ error?: string | null;
283
+ testId?: string;
284
+ onCopy: () => void;
285
+ onContinue: () => void;
286
+ };
185
287
  export type LoginInvitationState = {
186
288
  kind: 'invitation';
187
289
  identity?: string | null;
@@ -232,18 +334,25 @@ export type LoginConsentState = {
232
334
  };
233
335
  export type LoginStatusState = {
234
336
  kind: 'status';
235
- /** `info` is a neutral notice, such as "check your email"; it keeps the normal logo. */
236
- tone: 'success' | 'error' | 'disabled' | 'info';
337
+ /**
338
+ * `info` is a neutral notice, such as "check your email"; it keeps the normal logo. `working` is a progress message,
339
+ * for a request the screen waits on.
340
+ */
341
+ tone: 'success' | 'error' | 'disabled' | 'info' | 'working';
237
342
  message: string;
238
343
  detail?: string;
344
+ /** A failure beside the message, under any tone, such as a send that failed on an `info` notice. */
345
+ error?: string | null;
239
346
  recoverable?: boolean;
240
347
  retryLabel?: string;
241
348
  testId?: string;
242
349
  onRetry?: () => void;
243
- primaryAction?: {
244
- label: string;
245
- onClick: () => void;
350
+ primaryAction?: LoginScreenAction & {
351
+ /** Its request is in flight: the action and `secondaryAction` are locked. Pass the in-flight wording as `label`. */
352
+ busy?: boolean;
246
353
  };
354
+ /** The way back out, such as `Back to sign in`. It shows beside `primaryAction`, the retry, or alone. */
355
+ secondaryAction?: LoginScreenAction;
247
356
  };
248
357
  /**
249
358
  * The tab that started a cross-device sign-in, waiting while the link is approved. The outcome messages use `status`,
@@ -288,7 +397,7 @@ export type LoginPasswordlessApprovalLoadingState = {
288
397
  loading: true;
289
398
  };
290
399
  export type LoginPasswordlessApprovalState = LoginPasswordlessApprovalFormState | LoginPasswordlessApprovalLoadingState;
291
- export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
400
+ export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginTwoFactorCodeState | LoginTwoFactorSetupState | LoginTwoFactorRecoveryCodesState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
292
401
  export type LoginScreenProps = {
293
402
  chrome: LoginScreenChrome;
294
403
  state: LoginScreenState;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,C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S,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,kCAAkC,GAAG,qCAAqC,CAAC;AAExH,MAAM,MAAM,gBAAgB,GACxB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,6BAA6B,GAC7B,8BAA8B,GAC9B,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,iBAAiB,GACjB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,gBAAgB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,aAAa,GAAG,IAAI,CA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IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,kCAAkC,GAAG,qCAAqC,CAAC;AAExH,MAAM,MAAM,gBAAgB,GACxB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,6BAA6B,GAC7B,8BAA8B,GAC9B,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,GACxB,sBAAsB,GACtB,uBAAuB,GACvB,wBAAwB,GACxB,gCAAgC,GAChC,oBAAoB,GACpB,sBAAsB,GACtB,iBAAiB,GACjB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { TwoFactorSetupResponse } from '@passflow/core';
2
+ /** Send taps on the email link screen: send, begin and challenge share 3 requests per 5 minutes on the server. */
3
+ export declare const TWO_FACTOR_LINK_MAX_SENDS = 3;
4
+ export type TwoFactorEnrollmentScreen = {
5
+ kind: 'loading';
6
+ } | {
7
+ kind: 'verify';
8
+ notice?: string;
9
+ digits?: number;
10
+ } | {
11
+ kind: 'email_link';
12
+ sent: boolean;
13
+ sends: number;
14
+ busy: boolean;
15
+ error?: string;
16
+ } | {
17
+ kind: 'direct';
18
+ step: 'start' | 'code' | 'codes';
19
+ data: TwoFactorSetupResponse | null;
20
+ codes: string[];
21
+ busy: boolean;
22
+ error?: string;
23
+ /** Shown on the code step until the next confirm. */
24
+ notice?: string;
25
+ } | {
26
+ kind: 'unavailable';
27
+ } | {
28
+ kind: 'ended';
29
+ message: string;
30
+ } | {
31
+ kind: 'read_failed';
32
+ } | {
33
+ kind: 'finished';
34
+ };
35
+ export type UseTwoFactorEnrollmentProps = {
36
+ /** The sign-in is finished, by the enrolment's verify or by `complete`. */
37
+ onFinished?: () => void;
38
+ };
39
+ export type UseTwoFactorEnrollmentReturn = {
40
+ screen: TwoFactorEnrollmentScreen;
41
+ /** Reads the state. It has no guard, so Try again and the `not_allowed` re-read work. */
42
+ read: () => Promise<void>;
43
+ sendLink: () => Promise<void>;
44
+ begin: () => Promise<void>;
45
+ confirm: (code: string) => Promise<void>;
46
+ /** "I've saved these codes": finishes the sign-in with the code that confirmed. */
47
+ finish: () => Promise<void>;
48
+ /** The verify or recovery form ended the sign-in. */
49
+ end: (type: 'expired' | 'rate_limited') => void;
50
+ /** The verify or recovery form finished the sign-in. */
51
+ complete: () => void;
52
+ };
53
+ /**
54
+ * What the verify screen shows for a pending sign-in, as the server decides it. Nothing that spends budget runs on
55
+ * mount: only the state is read, once, and the link send and begin wait for a tap.
56
+ */
57
+ export declare const useTwoFactorEnrollment: ({ onFinished }?: UseTwoFactorEnrollmentProps) => UseTwoFactorEnrollmentReturn;
58
+ //# sourceMappingURL=use-two-factor-enrollment.d.ts.map
@@ -0,0 +1,58 @@
1
+ import type { TwoFactorSetupResponse } from '@passflow/core';
2
+ /** Send taps on the email link screen: send, begin and challenge share 3 requests per 5 minutes on the server. */
3
+ export declare const TWO_FACTOR_LINK_MAX_SENDS = 3;
4
+ export type TwoFactorEnrollmentScreen = {
5
+ kind: 'loading';
6
+ } | {
7
+ kind: 'verify';
8
+ notice?: string;
9
+ digits?: number;
10
+ } | {
11
+ kind: 'email_link';
12
+ sent: boolean;
13
+ sends: number;
14
+ busy: boolean;
15
+ error?: string;
16
+ } | {
17
+ kind: 'direct';
18
+ step: 'start' | 'code' | 'codes';
19
+ data: TwoFactorSetupResponse | null;
20
+ codes: string[];
21
+ busy: boolean;
22
+ error?: string;
23
+ /** Shown on the code step until the next confirm. */
24
+ notice?: string;
25
+ } | {
26
+ kind: 'unavailable';
27
+ } | {
28
+ kind: 'ended';
29
+ message: string;
30
+ } | {
31
+ kind: 'read_failed';
32
+ } | {
33
+ kind: 'finished';
34
+ };
35
+ export type UseTwoFactorEnrollmentProps = {
36
+ /** The sign-in is finished, by the enrolment's verify or by `complete`. */
37
+ onFinished?: () => void;
38
+ };
39
+ export type UseTwoFactorEnrollmentReturn = {
40
+ screen: TwoFactorEnrollmentScreen;
41
+ /** Reads the state. It has no guard, so Try again and the `not_allowed` re-read work. */
42
+ read: () => Promise<void>;
43
+ sendLink: () => Promise<void>;
44
+ begin: () => Promise<void>;
45
+ confirm: (code: string) => Promise<void>;
46
+ /** "I've saved these codes": finishes the sign-in with the code that confirmed. */
47
+ finish: () => Promise<void>;
48
+ /** The verify or recovery form ended the sign-in. */
49
+ end: (type: 'expired' | 'rate_limited') => void;
50
+ /** The verify or recovery form finished the sign-in. */
51
+ complete: () => void;
52
+ };
53
+ /**
54
+ * What the verify screen shows for a pending sign-in, as the server decides it. Nothing that spends budget runs on
55
+ * mount: only the state is read, once, and the link send and begin wait for a tap.
56
+ */
57
+ export declare const useTwoFactorEnrollment: ({ onFinished }?: UseTwoFactorEnrollmentProps) => UseTwoFactorEnrollmentReturn;
58
+ //# sourceMappingURL=use-two-factor-enrollment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-two-factor-enrollment.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-en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AQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,mFAAmF;IACnF,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,qDAAqD;IACrD,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,KAAK,IAAI,CAAC;IAChD,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAiBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,oBAAoB,2BAA2B,KAAQ,4BAkIzF,CAAC"}
@@ -1,11 +1,4 @@
1
- /**
2
- * Magic link validation error type
3
- */
4
- export type TwoFactorSetupMagicLinkError = {
5
- code: 'INVALID_TOKEN' | 'EXPIRED_TOKEN' | 'REVOKED_TOKEN' | 'RATE_LIMITED' | 'SERVER_ERROR';
6
- message: string;
7
- retryAfter?: number;
8
- };
1
+ import type { TwoFactorSetupMagicLinkError } from '@passflow/core';
9
2
  /**
10
3
  * Return type for useTwoFactorSetupMagicLink hook
11
4
  */
@@ -26,8 +19,6 @@ export type UseTwoFactorSetupMagicLinkReturn = {
26
19
  appId: string | null;
27
20
  /** Session expiration in seconds */
28
21
  expiresIn: number | null;
29
- /** Retry countdown for rate-limited errors (null if not rate limited) */
30
- retryCountdown: number | null;
31
22
  /** Manual retry function for transient errors */
32
23
  retry: () => Promise<void>;
33
24
  };
@@ -35,19 +26,18 @@ export type UseTwoFactorSetupMagicLinkReturn = {
35
26
  * Hook to validate magic link token for 2FA setup
36
27
  *
37
28
  * This hook:
38
- * - Validates token on mount (automatic)
39
- * - Caches validation result per token (prevents duplicate calls)
29
+ * - Validates once per token on mount (StrictMode included), after app id discovery ends: the session lives in memory
30
+ * on the Passflow instance, and discovery replaces the instance
40
31
  * - Provides loading, error, and success states
41
32
  * - Allows manual retry for transient failures
42
- * - Handles rate limit countdown
43
33
  * - Cleans up conditionally on unmount (only if validation failed or not validated)
44
34
  *
45
35
  * Usage:
46
36
  * ```tsx
47
- * const { isLoading, isValidated, error, retry, retryCountdown } = useTwoFactorSetupMagicLink(token);
37
+ * const { isLoading, isValidated, error, retry } = useTwoFactorSetupMagicLink(token);
48
38
  *
49
39
  * if (isLoading) return <Loading />;
50
- * if (error) return <ErrorUI error={error} onRetry={retry} countdown={retryCountdown} />;
40
+ * if (error) return <ErrorUI error={error} onRetry={retry} />;
51
41
  * if (isValidated) return <TwoFactorSetupForm />;
52
42
  * ```
53
43
  */
@@ -1,11 +1,4 @@
1
- /**
2
- * Magic link validation error type
3
- */
4
- export type TwoFactorSetupMagicLinkError = {
5
- code: 'INVALID_TOKEN' | 'EXPIRED_TOKEN' | 'REVOKED_TOKEN' | 'RATE_LIMITED' | 'SERVER_ERROR';
6
- message: string;
7
- retryAfter?: number;
8
- };
1
+ import type { TwoFactorSetupMagicLinkError } from '@passflow/core';
9
2
  /**
10
3
  * Return type for useTwoFactorSetupMagicLink hook
11
4
  */
@@ -26,8 +19,6 @@ export type UseTwoFactorSetupMagicLinkReturn = {
26
19
  appId: string | null;
27
20
  /** Session expiration in seconds */
28
21
  expiresIn: number | null;
29
- /** Retry countdown for rate-limited errors (null if not rate limited) */
30
- retryCountdown: number | null;
31
22
  /** Manual retry function for transient errors */
32
23
  retry: () => Promise<void>;
33
24
  };
@@ -35,19 +26,18 @@ export type UseTwoFactorSetupMagicLinkReturn = {
35
26
  * Hook to validate magic link token for 2FA setup
36
27
  *
37
28
  * This hook:
38
- * - Validates token on mount (automatic)
39
- * - Caches validation result per token (prevents duplicate calls)
29
+ * - Validates once per token on mount (StrictMode included), after app id discovery ends: the session lives in memory
30
+ * on the Passflow instance, and discovery replaces the instance
40
31
  * - Provides loading, error, and success states
41
32
  * - Allows manual retry for transient failures
42
- * - Handles rate limit countdown
43
33
  * - Cleans up conditionally on unmount (only if validation failed or not validated)
44
34
  *
45
35
  * Usage:
46
36
  * ```tsx
47
- * const { isLoading, isValidated, error, retry, retryCountdown } = useTwoFactorSetupMagicLink(token);
37
+ * const { isLoading, isValidated, error, retry } = useTwoFactorSetupMagicLink(token);
48
38
  *
49
39
  * if (isLoading) return <Loading />;
50
- * if (error) return <ErrorUI error={error} onRetry={retry} countdown={retryCountdown} />;
40
+ * if (error) return <ErrorUI error={error} onRetry={retry} />;
51
41
  * if (isValidated) return <TwoFactorSetupForm />;
52
42
  * ```
53
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"use-two-factor-setup-magic-link.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-setup-magic-link.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,CAAC;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAcF;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,6BAA6B;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC3C,iCAAiC;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2BAA2B;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wCAAwC;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oCAAoC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yEAAyE;IACzE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iDAAiD;IACjD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,0BAA0B,UAAW,MAAM,KAAG,gCAiL1D,CAAC"}
1
+ {"version":3,"file":"use-two-factor-setup-magic-link.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-setup-magic-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAoC,MAAM,gBAAgB,CAAC;AAcrG;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,6BAA6B;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC3C,iCAAiC;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2BAA2B;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wCAAwC;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oCAAoC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iDAAiD;IACjD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,UAAW,MAAM,KAAG,gCAyG1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-two-factor-setup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAIvF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAA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@ -1 +1 @@
1
- {"version":3,"file":"use-two-factor-verify.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAErH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIpF,MAAM,MAAM,uBAAuB,GAAG,MAAM;IAC1C,sBAAsB,EAAE,MAAM,OAAO,CAAC;IACtC,qFAAqF;IACrF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACxG,qFAAqF;IACrF,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IACnH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBAkFhC,CAAC"}
1
+ {"version":3,"file":"use-two-factor-verify.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAErH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIpF,MAAM,MAAM,uBAAuB,GAAG,MAAM;IAC1C,sBAAsB,EAAE,MAAM,OAAO,CAAC;IACtC,qFAAqF;IACrF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACxG,qFAAqF;IACrF,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IACnH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBAiFhC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Types of 2FA errors with different handling strategies
3
3
  */
4
- export type TwoFactorErrorType = 'expired' | 'not_enabled' | 'invalid_code' | 'generic';
4
+ export type TwoFactorErrorType = 'expired' | 'rate_limited' | 'not_enabled' | 'invalid_code' | 'generic';
5
5
  /**
6
6
  * Structured error information for 2FA errors
7
7
  */
@@ -9,6 +9,5 @@ export type TwoFactorError = {
9
9
  type: TwoFactorErrorType;
10
10
  message: string;
11
11
  isRecoverable: boolean;
12
- shouldAutoRedirect: boolean;
13
12
  };
14
13
  //# sourceMappingURL=two-factor-errors.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Types of 2FA errors with different handling strategies
3
3
  */
4
- export type TwoFactorErrorType = 'expired' | 'not_enabled' | 'invalid_code' | 'generic';
4
+ export type TwoFactorErrorType = 'expired' | 'rate_limited' | 'not_enabled' | 'invalid_code' | 'generic';
5
5
  /**
6
6
  * Structured error information for 2FA errors
7
7
  */
@@ -9,6 +9,5 @@ export type TwoFactorError = {
9
9
  type: TwoFactorErrorType;
10
10
  message: string;
11
11
  isRecoverable: boolean;
12
- shouldAutoRedirect: boolean;
13
12
  };
14
13
  //# sourceMappingURL=two-factor-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"two-factor-errors.d.ts","sourceRoot":"","sources":["../../../src/types/two-factor-errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,aAAa,GACb,cAAc,GACd,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"two-factor-errors.d.ts","sourceRoot":"","sources":["../../../src/types/two-factor-errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,cAAc,GACd,aAAa,GACb,cAAc,GACd,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"}
@@ -81,4 +81,27 @@ export declare const isPasswordSavedRateLimit: (error: unknown) => boolean;
81
81
  * failure asks to retry. The raw message of anything else is never shown.
82
82
  */
83
83
  export declare const newPasswordErrorMessage: (error: unknown) => string;
84
+ export declare const twoFactorSignInOverMessage = "Your sign-in has ended. Sign in again.";
85
+ export declare const twoFactorSetupSavedSignInMessage = "Your setup is saved. Sign in again.";
86
+ export declare const twoFactorSetupSavedNewCodeMessage = "Your setup is saved. Enter a new code from your authenticator app to finish signing in.";
87
+ export declare const twoFactorSetupCodeChangedMessage = "Your setup code changed. Scan this new QR code.";
88
+ export declare const twoFactorRateLimitedMessage = "Too many attempts. Sign in again later.";
89
+ export declare const twoFactorWrongCodeMessage = "Invalid code. Please check your authenticator app and try again.";
90
+ export declare const twoFactorWrongRecoveryCodeMessage = "Invalid recovery code.";
91
+ export declare const twoFactorNotEnabledMessage = "Two-factor authentication is not enabled for your account. Please contact your administrator to enable 2FA.";
92
+ export declare const twoFactorSendFailedMessage = "We could not send the setup email. Try again later or contact your administrator.";
93
+ export declare const twoFactorTryAgainMessage = "Something went wrong. Try again.";
94
+ export declare const twoFactorLinkAlreadyUsedMessage = "This link was already used. Sign in.";
95
+ export declare const twoFactorBackToSignInLabel = "Back to sign in";
96
+ export declare const twoFactorSignInLabel = "Sign in";
97
+ export type EnrollmentFailure = 'over' | 'rate_limited' | 'wrong_code' | 'setup_incomplete' | 'not_allowed' | 'send_failed' | 'unavailable' | 'other';
98
+ /** The id of a server error, in a `PassflowError` or a raw axios rejection's object body. */
99
+ export declare const serverErrorIdFrom: (error: unknown) => unknown;
100
+ /** The HTTP status of a server error. `readServerError` skips a raw 429's string body, so its response is read too. */
101
+ export declare const serverErrorStatusFrom: (error: unknown) => unknown;
102
+ /**
103
+ * What a failed confirm, verify, begin or send means for the sign-in. The order matters: several ids answer 401 and do
104
+ * not mean the sign-in ended. Network errors, core's format errors and a `TypeError` from a string body are `other`.
105
+ */
106
+ export declare const enrollmentFailureFrom: (error: unknown) => EnrollmentFailure;
84
107
  //# sourceMappingURL=auth-error.d.ts.map
@@ -81,4 +81,27 @@ export declare const isPasswordSavedRateLimit: (error: unknown) => boolean;
81
81
  * failure asks to retry. The raw message of anything else is never shown.
82
82
  */
83
83
  export declare const newPasswordErrorMessage: (error: unknown) => string;
84
+ export declare const twoFactorSignInOverMessage = "Your sign-in has ended. Sign in again.";
85
+ export declare const twoFactorSetupSavedSignInMessage = "Your setup is saved. Sign in again.";
86
+ export declare const twoFactorSetupSavedNewCodeMessage = "Your setup is saved. Enter a new code from your authenticator app to finish signing in.";
87
+ export declare const twoFactorSetupCodeChangedMessage = "Your setup code changed. Scan this new QR code.";
88
+ export declare const twoFactorRateLimitedMessage = "Too many attempts. Sign in again later.";
89
+ export declare const twoFactorWrongCodeMessage = "Invalid code. Please check your authenticator app and try again.";
90
+ export declare const twoFactorWrongRecoveryCodeMessage = "Invalid recovery code.";
91
+ export declare const twoFactorNotEnabledMessage = "Two-factor authentication is not enabled for your account. Please contact your administrator to enable 2FA.";
92
+ export declare const twoFactorSendFailedMessage = "We could not send the setup email. Try again later or contact your administrator.";
93
+ export declare const twoFactorTryAgainMessage = "Something went wrong. Try again.";
94
+ export declare const twoFactorLinkAlreadyUsedMessage = "This link was already used. Sign in.";
95
+ export declare const twoFactorBackToSignInLabel = "Back to sign in";
96
+ export declare const twoFactorSignInLabel = "Sign in";
97
+ export type EnrollmentFailure = 'over' | 'rate_limited' | 'wrong_code' | 'setup_incomplete' | 'not_allowed' | 'send_failed' | 'unavailable' | 'other';
98
+ /** The id of a server error, in a `PassflowError` or a raw axios rejection's object body. */
99
+ export declare const serverErrorIdFrom: (error: unknown) => unknown;
100
+ /** The HTTP status of a server error. `readServerError` skips a raw 429's string body, so its response is read too. */
101
+ export declare const serverErrorStatusFrom: (error: unknown) => unknown;
102
+ /**
103
+ * What a failed confirm, verify, begin or send means for the sign-in. The order matters: several ids answer 401 and do
104
+ * not mean the sign-in ended. Network errors, core's format errors and a `TypeError` from a string body are `other`.
105
+ */
106
+ export declare const enrollmentFailureFrom: (error: unknown) => EnrollmentFailure;
84
107
  //# sourceMappingURL=auth-error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BA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CAAC"}
@@ -1,11 +1,10 @@
1
- import type { TwoFactorError } from '../types/two-factor-errors.cjs';
1
+ import type { TwoFactorError, TwoFactorErrorType } from '../types/two-factor-errors.cjs';
2
2
  /**
3
- * Classify 2FA error based on error message
4
- *
5
- * @param errorMessage - Error message from SDK
6
- * @returns Classified error with handling strategy
3
+ * Classify a 2FA error from the error itself, not its message: the server localises messages.
7
4
  */
8
- export declare function classifyTwoFactorError(errorMessage: string): TwoFactorError;
5
+ export declare function classifyTwoFactorError(error: unknown): TwoFactorError;
6
+ /** No further code can be taken on the screen: only the way back to sign in is left. */
7
+ export declare const isTerminalTwoFactorError: (type: TwoFactorErrorType | undefined) => boolean;
9
8
  /**
10
9
  * Get user-friendly error message based on error type
11
10
  */
@@ -1,11 +1,10 @@
1
- import type { TwoFactorError } from '../types/two-factor-errors.js';
1
+ import type { TwoFactorError, TwoFactorErrorType } from '../types/two-factor-errors.js';
2
2
  /**
3
- * Classify 2FA error based on error message
4
- *
5
- * @param errorMessage - Error message from SDK
6
- * @returns Classified error with handling strategy
3
+ * Classify a 2FA error from the error itself, not its message: the server localises messages.
7
4
  */
8
- export declare function classifyTwoFactorError(errorMessage: string): TwoFactorError;
5
+ export declare function classifyTwoFactorError(error: unknown): TwoFactorError;
6
+ /** No further code can be taken on the screen: only the way back to sign in is left. */
7
+ export declare const isTerminalTwoFactorError: (type: TwoFactorErrorType | undefined) => boolean;
9
8
  /**
10
9
  * Get user-friendly error message based on error type
11
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"classify-two-factor-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-two-factor-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAWhE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAwC3E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAWzE"}
1
+ {"version":3,"file":"classify-two-factor-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-two-factor-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AA0BpF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAOrE;AAED,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,SAAU,kBAAkB,GAAG,SAAS,KAAG,OACP,CAAC;AAE1E;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAazE"}
@@ -1,6 +1,6 @@
1
- export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
1
+ export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
2
2
  export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.cjs';
3
- export { classifyTwoFactorError, getUserFriendlyErrorMessage } from './classify-two-factor-error.cjs';
3
+ export { classifyTwoFactorError, getUserFriendlyErrorMessage, isTerminalTwoFactorError } from './classify-two-factor-error.cjs';
4
4
  export { cn } from './cn.cjs';
5
5
  export * from './dayjs/index.cjs';
6
6
  export { type EmailCodeStepEvent, type EmailCodeStepState, emailCodeStepReducer, initialEmailCodeStepState, readEmailVerificationStep, } from './email-verification.cjs';
@@ -9,7 +9,7 @@ export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from
9
9
  export { getUrlErrors } from './get-url-errors.cjs';
10
10
  export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.cjs';
11
11
  export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.cjs';
12
- export { routeToSecondFactor, urlCarriesTwoFactorToken } from './second-factor.cjs';
12
+ export { routeToSecondFactor, signInSearch, urlCarriesTwoFactorToken } from './second-factor.cjs';
13
13
  export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.cjs';
14
14
  export { undefinedOnCatch } from './undefined-on-catch.cjs';
15
15
  export { attachAuth, registerUpgradeAuthInstance, releaseUpgradeAuthInstance, upgradeAuthInstance, withAuth, } from './upgrade-auth.cjs';
@@ -1,6 +1,6 @@
1
- export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.js';
1
+ export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.js';
2
2
  export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.js';
3
- export { classifyTwoFactorError, getUserFriendlyErrorMessage } from './classify-two-factor-error.js';
3
+ export { classifyTwoFactorError, getUserFriendlyErrorMessage, isTerminalTwoFactorError } from './classify-two-factor-error.js';
4
4
  export { cn } from './cn.js';
5
5
  export * from './dayjs/index.js';
6
6
  export { type EmailCodeStepEvent, type EmailCodeStepState, emailCodeStepReducer, initialEmailCodeStepState, readEmailVerificationStep, } from './email-verification.js';
@@ -9,7 +9,7 @@ export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from
9
9
  export { getUrlErrors } from './get-url-errors.js';
10
10
  export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.js';
11
11
  export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.js';
12
- export { routeToSecondFactor, urlCarriesTwoFactorToken } from './second-factor.js';
12
+ export { routeToSecondFactor, signInSearch, urlCarriesTwoFactorToken } from './second-factor.js';
13
13
  export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.js';
14
14
  export { undefinedOnCatch } from './undefined-on-catch.js';
15
15
  export { attachAuth, registerUpgradeAuthInstance, releaseUpgradeAuthInstance, upgradeAuthInstance, withAuth, } from './upgrade-auth.js';