@passflow/react 0.0.1 → 0.2.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 (106) hide show
  1. package/dist/index.cjs.js +4 -4
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +1440 -119
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/src/components/flow/index.d.ts +1 -0
  6. package/dist/src/components/flow/index.d.ts.map +1 -1
  7. package/dist/src/components/flow/passflow/index.d.ts +1 -1
  8. package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
  9. package/dist/src/components/flow/two-factor-setup/index.d.ts +10 -0
  10. package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -0
  11. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +35 -0
  12. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -0
  13. package/dist/src/components/flow/two-factor-verify/index.d.ts +10 -0
  14. package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -0
  15. package/dist/src/components/form/index.d.ts +2 -0
  16. package/dist/src/components/form/index.d.ts.map +1 -1
  17. package/dist/src/components/form/invitation-join/index.d.ts +1 -1
  18. package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
  19. package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
  20. package/dist/src/components/form/signin/index.d.ts +2 -1
  21. package/dist/src/components/form/signin/index.d.ts.map +1 -1
  22. package/dist/src/components/form/signup/index.d.ts +1 -1
  23. package/dist/src/components/form/signup/index.d.ts.map +1 -1
  24. package/dist/src/components/form/two-factor-setup/index.d.ts +2 -0
  25. package/dist/src/components/form/two-factor-setup/index.d.ts.map +1 -0
  26. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +9 -0
  27. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -0
  28. package/dist/src/components/form/two-factor-verify/index.d.ts +3 -0
  29. package/dist/src/components/form/two-factor-verify/index.d.ts.map +1 -0
  30. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +11 -0
  31. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -0
  32. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +14 -0
  33. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -0
  34. package/dist/src/components/form/verify-challenge/{varify-challenge-otp-redirect.d.ts → verify-challenge-otp-redirect.d.ts} +1 -1
  35. package/dist/src/components/form/verify-challenge/{varify-challenge-otp-redirect.d.ts.map → verify-challenge-otp-redirect.d.ts.map} +1 -1
  36. package/dist/src/components/form/verify-challenge/{varify-challenge-success.d.ts → verify-challenge-success.d.ts} +1 -1
  37. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +1 -0
  38. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  39. package/dist/src/context/passflow-context.d.ts +2 -0
  40. package/dist/src/context/passflow-context.d.ts.map +1 -1
  41. package/dist/src/context/router-context.d.ts +12 -0
  42. package/dist/src/context/router-context.d.ts.map +1 -1
  43. package/dist/src/hocs/with-error.d.ts +1 -1
  44. package/dist/src/hocs/with-error.d.ts.map +1 -1
  45. package/dist/src/hooks/index.d.ts +5 -0
  46. package/dist/src/hooks/index.d.ts.map +1 -1
  47. package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
  48. package/dist/src/hooks/use-passflow-store.d.ts.map +1 -1
  49. package/dist/src/hooks/use-signin.d.ts.map +1 -1
  50. package/dist/src/hooks/use-two-factor-manage.d.ts +15 -0
  51. package/dist/src/hooks/use-two-factor-manage.d.ts.map +1 -0
  52. package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts +55 -0
  53. package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -0
  54. package/dist/src/hooks/use-two-factor-setup.d.ts +18 -0
  55. package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -0
  56. package/dist/src/hooks/use-two-factor-status.d.ts +13 -0
  57. package/dist/src/hooks/use-two-factor-status.d.ts.map +1 -0
  58. package/dist/src/hooks/use-two-factor-verify.d.ts +18 -0
  59. package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -0
  60. package/dist/src/test/setup.d.ts +1 -0
  61. package/dist/src/test/setup.d.ts.map +1 -0
  62. package/dist/src/test/utils/render.d.ts +4 -0
  63. package/dist/src/test/utils/render.d.ts.map +1 -0
  64. package/dist/src/test/utils/test-passflow.d.ts +6 -0
  65. package/dist/src/test/utils/test-passflow.d.ts.map +1 -0
  66. package/dist/src/types/index.d.ts +1 -0
  67. package/dist/src/types/index.d.ts.map +1 -1
  68. package/dist/src/types/two-factor-errors.d.ts +14 -0
  69. package/dist/src/types/two-factor-errors.d.ts.map +1 -0
  70. package/dist/src/utils/classify-two-factor-error.d.ts +13 -0
  71. package/dist/src/utils/classify-two-factor-error.d.ts.map +1 -0
  72. package/dist/src/utils/{cn/index.d.ts → cn.d.ts} +1 -1
  73. package/dist/src/utils/cn.d.ts.map +1 -0
  74. package/dist/src/utils/{get-app-version/index.d.ts → get-app-version.d.ts} +1 -1
  75. package/dist/src/utils/get-app-version.d.ts.map +1 -0
  76. package/dist/src/utils/{get-auth-methods/index.d.ts → get-auth-methods.d.ts} +1 -1
  77. package/dist/src/utils/get-auth-methods.d.ts.map +1 -0
  78. package/dist/src/utils/{get-form-labels/index.d.ts → get-form-labels.d.ts} +3 -3
  79. package/dist/src/utils/get-form-labels.d.ts.map +1 -0
  80. package/dist/src/utils/{get-url-errors/index.d.ts → get-url-errors.d.ts} +1 -1
  81. package/dist/src/utils/get-url-errors.d.ts.map +1 -0
  82. package/dist/src/utils/get-url-with-tokens.d.ts +4 -0
  83. package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -0
  84. package/dist/src/utils/index.d.ts +3 -1
  85. package/dist/src/utils/index.d.ts.map +1 -1
  86. package/dist/src/utils/two-factor-loop-prevention.d.ts +40 -0
  87. package/dist/src/utils/two-factor-loop-prevention.d.ts.map +1 -0
  88. package/dist/src/utils/{undefined-on-catch/index.d.ts → undefined-on-catch.d.ts} +1 -1
  89. package/dist/src/utils/undefined-on-catch.d.ts.map +1 -0
  90. package/dist/src/utils/{url-params/index.d.ts → url-params.d.ts} +1 -1
  91. package/dist/src/utils/url-params.d.ts.map +1 -0
  92. package/dist/src/utils/{validate-url/index.d.ts → validate-url.d.ts} +1 -1
  93. package/dist/src/utils/validate-url.d.ts.map +1 -0
  94. package/dist/style.css +1 -1
  95. package/package.json +31 -31
  96. package/dist/src/components/form/verify-challenge/varify-challenge-success.d.ts.map +0 -1
  97. package/dist/src/utils/cn/index.d.ts.map +0 -1
  98. package/dist/src/utils/get-app-version/index.d.ts.map +0 -1
  99. package/dist/src/utils/get-auth-methods/index.d.ts.map +0 -1
  100. package/dist/src/utils/get-form-labels/index.d.ts.map +0 -1
  101. package/dist/src/utils/get-url-errors/index.d.ts.map +0 -1
  102. package/dist/src/utils/get-url-with-tokens/index.d.ts +0 -3
  103. package/dist/src/utils/get-url-with-tokens/index.d.ts.map +0 -1
  104. package/dist/src/utils/undefined-on-catch/index.d.ts.map +0 -1
  105. package/dist/src/utils/url-params/index.d.ts.map +0 -1
  106. package/dist/src/utils/validate-url/index.d.ts.map +0 -1
@@ -1,2 +1,3 @@
1
1
  export { PassflowFlow } from './passflow';
2
+ export { TwoFactorSetupMagicLinkFlow, type TwoFactorSetupMagicLinkFlowProps } from './two-factor-setup-magic-link';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/flow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/flow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,2BAA2B,EAAE,KAAK,gCAAgC,EAAE,MAAM,+BAA+B,CAAC"}
@@ -8,5 +8,5 @@ export type PassflowProps = {
8
8
  routerType?: 'browser' | 'hash' | 'memory';
9
9
  basename?: string;
10
10
  };
11
- export declare const PassflowFlow: (props: PassflowProps) => import("react").JSX.Element;
11
+ export declare const PassflowFlow: (props: PassflowProps) => import("react").JSX.Element | null;
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"AAYA,OAAO,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,MAAM,MAAM,aAAa,GAAG;IAC1B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA2KF,eAAO,MAAM,YAAY,uDAA6C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"AAcA,OAAO,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,MAAM,MAAM,aAAa,GAAG;IAC1B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAgMF,eAAO,MAAM,YAAY,8DAA6C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { SuccessAuthRedirect } from '../../../types';
2
+ import { FC } from 'react';
3
+ type TwoFactorSetupFlowProps = {
4
+ successAuthRedirect?: SuccessAuthRedirect;
5
+ twoFactorVerifyPath?: string;
6
+ signInPath?: string;
7
+ };
8
+ export declare const TwoFactorSetupFlow: FC<TwoFactorSetupFlowProps>;
9
+ export {};
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,oBAAoB,CAAC;AAE5B,KAAK,uBAAuB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA+C1D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { UseTwoFactorSetupMagicLinkReturn } from '../../../hooks';
2
+ import { FC } from 'react';
3
+ /**
4
+ * Error type for magic link validation
5
+ */
6
+ type MagicLinkError = NonNullable<UseTwoFactorSetupMagicLinkReturn['error']>;
7
+ /**
8
+ * Props for TwoFactorSetupMagicLinkFlow component
9
+ */
10
+ export type TwoFactorSetupMagicLinkFlowProps = {
11
+ /** Callback after successful setup */
12
+ onSuccess?: () => void;
13
+ /** Callback on validation error */
14
+ onError?: (error: MagicLinkError) => void;
15
+ /** Whether to redirect after setup (default: true) */
16
+ redirectOnSuccess?: boolean;
17
+ /** Path to sign-in page (default: /signin) */
18
+ signInPath?: string;
19
+ };
20
+ /**
21
+ * Flow component for magic link 2FA setup
22
+ *
23
+ * This component:
24
+ * 1. Extracts token from URL params
25
+ * 2. Validates token via useTwoFactorSetupMagicLink hook
26
+ * 3. Shows loading state during validation
27
+ * 4. Shows error UI if validation fails
28
+ * 5. Renders TwoFactorSetupForm if validation succeeds
29
+ * 6. Redirects to sign-in after successful setup
30
+ *
31
+ * Route: /two-factor-setup-magic-link/:token
32
+ */
33
+ export declare const TwoFactorSetupMagicLinkFlow: FC<TwoFactorSetupMagicLinkFlowProps>;
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup-magic-link/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gCAAgC,EAA6C,MAAM,SAAS,CAAC;AAC3G,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,oBAAoB,CAAC;AAE5B;;GAEG;AACH,KAAK,cAAc,GAAG,WAAW,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,gCAAgC,CAsH5E,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { SuccessAuthRedirect } from '../../../types';
2
+ import { FC } from 'react';
3
+ type TwoFactorVerifyFlowProps = {
4
+ successAuthRedirect?: SuccessAuthRedirect;
5
+ signInPath?: string;
6
+ twoFactorSetupPath?: string;
7
+ };
8
+ export declare const TwoFactorVerifyFlow: FC<TwoFactorVerifyFlowProps>;
9
+ export {};
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-verify/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,oBAAoB,CAAC;AAE5B,KAAK,wBAAwB,GAAG;IAC9B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA2F5D,CAAC"}
@@ -5,4 +5,6 @@ export * from './verify-challenge';
5
5
  export * from './forgot-password';
6
6
  export * from './reset-password';
7
7
  export * from './invitation-join';
8
+ export * from './two-factor-verify';
9
+ export * from './two-factor-setup';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -4,5 +4,5 @@ export type TInvitationJoinFlow = {
4
4
  signInPath?: string;
5
5
  signUpPath?: string;
6
6
  };
7
- export declare const InvitationJoin: (props: TInvitationJoinFlow) => React.JSX.Element;
7
+ export declare const InvitationJoin: (props: TInvitationJoinFlow) => React.JSX.Element | null;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/invitation-join/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,oBAAoB,CAAC;AAS5B,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAkHF,eAAO,MAAM,cAAc,mDAAgD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/invitation-join/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,oBAAoB,CAAC;AAS5B,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAoHF,eAAO,MAAM,cAAc,0DAAgD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/reset-password/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAanD,KAAK,cAAc,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CAyI5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/reset-password/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAanD,KAAK,cAAc,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CA6I5C,CAAC"}
@@ -8,7 +8,8 @@ export type TSignIn = {
8
8
  verifyOTPPath?: string;
9
9
  verifyMagicLinkPath?: string;
10
10
  forgotPasswordPath?: string;
11
+ twoFactorVerifyPath?: string;
11
12
  };
12
13
  export declare const SignInForm: FC<TSignIn>;
13
- export declare const SignIn: (props: TSignIn) => React.JSX.Element;
14
+ export declare const SignIn: (props: TSignIn) => React.JSX.Element | null;
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsBlE,OAAO,KAAK,EAAE,EAAoB,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAIvF,OAAO,oBAAoB,CAAC;AAQ5B,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CAielC,CAAC;AAEF,eAAO,MAAM,MAAM,uCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsBlE,OAAO,KAAK,EAAE,EAAoB,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAIvF,OAAO,oBAAoB,CAAC;AAQ5B,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CAuflC,CAAC;AAEF,eAAO,MAAM,MAAM,8CAAwC,CAAC"}
@@ -9,5 +9,5 @@ export type TSignUp = {
9
9
  verifyMagicLinkPath?: string;
10
10
  };
11
11
  export declare const SignUpForm: FC<TSignUp>;
12
- export declare const SignUp: (props: TSignUp) => React.JSX.Element;
12
+ export declare const SignUp: (props: TSignUp) => React.JSX.Element | null;
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signup/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,EAAoB,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAGvF,OAAO,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAWlE,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CA8elC,CAAC;AAEF,eAAO,MAAM,MAAM,uCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signup/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,EAAoB,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAGvF,OAAO,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAWlE,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CAyflC,CAAC;AAEF,eAAO,MAAM,MAAM,8CAAwC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './two-factor-setup-form';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-setup/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ type TwoFactorSetupFormProps = {
3
+ onComplete?: (recoveryCodes: string[]) => void;
4
+ onCancel?: () => void;
5
+ numInputs?: number;
6
+ };
7
+ export declare const TwoFactorSetupForm: FC<TwoFactorSetupFormProps>;
8
+ export {};
9
+ //# sourceMappingURL=two-factor-setup-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"two-factor-setup-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-setup/two-factor-setup-form.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAK3C,OAAO,oBAAoB,CAAC;AAE5B,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA+I1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './two-factor-verify-form';
2
+ export * from './two-factor-recovery-form';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-verify/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ type TwoFactorRecoveryFormProps = {
3
+ onSuccess?: () => void;
4
+ onBack?: () => void;
5
+ title?: string;
6
+ subtitle?: string;
7
+ signInPath?: string;
8
+ };
9
+ export declare const TwoFactorRecoveryForm: FC<TwoFactorRecoveryFormProps>;
10
+ export {};
11
+ //# sourceMappingURL=two-factor-recovery-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"two-factor-recovery-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-verify/two-factor-recovery-form.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,EAAE,EAAa,MAAM,OAAO,CAAC;AAIxD,OAAO,oBAAoB,CAAC;AAE5B,KAAK,0BAA0B,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA6JhE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ type TwoFactorVerifyFormProps = {
3
+ onSuccess?: () => void;
4
+ onUseRecovery?: () => void;
5
+ title?: string;
6
+ subtitle?: string;
7
+ numInputs?: number;
8
+ shouldAutoFocus?: boolean;
9
+ signInPath?: string;
10
+ twoFactorSetupPath?: string;
11
+ };
12
+ export declare const TwoFactorVerifyForm: FC<TwoFactorVerifyFormProps>;
13
+ export {};
14
+ //# sourceMappingURL=two-factor-verify-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"two-factor-verify-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-verify/two-factor-verify-form.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAK3C,OAAO,oBAAoB,CAAC;AAE5B,KAAK,wBAAwB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAoM5D,CAAC"}
@@ -6,4 +6,4 @@ type VerifyChallengeOTPRedirectProps = {
6
6
  };
7
7
  export declare const VerifyChallengeOTPRedirect: ({ otp, challengeId, appId }: VerifyChallengeOTPRedirectProps) => React.JSX.Element | null;
8
8
  export {};
9
- //# sourceMappingURL=varify-challenge-otp-redirect.d.ts.map
9
+ //# sourceMappingURL=verify-challenge-otp-redirect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"varify-challenge-otp-redirect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/varify-challenge-otp-redirect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,KAAK,+BAA+B,GAAG;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,6BAA6B,+BAA+B,6BAkDtG,CAAC"}
1
+ {"version":3,"file":"verify-challenge-otp-redirect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-redirect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,KAAK,+BAA+B,GAAG;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,6BAA6B,+BAA+B,6BAkDtG,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
2
  export declare const VerifyChallengeSuccess: FC;
3
- //# sourceMappingURL=varify-challenge-success.d.ts.map
3
+ //# sourceMappingURL=verify-challenge-success.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-challenge-success.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-success.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,eAAO,MAAM,sBAAsB,EAAE,EAmBpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"passflow-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/provider/passflow-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAGrB,KAAK,UAAU,EAIhB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AACnG,OAAO,oBAAoB,CAAC;AAE5B,KAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0CtD,CAAC"}
1
+ {"version":3,"file":"passflow-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/provider/passflow-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAGrB,KAAK,UAAU,EAIhB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AACtH,OAAO,oBAAoB,CAAC;AAE5B,KAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA2GtD,CAAC"}
@@ -8,6 +8,8 @@ export type PassflowState = {
8
8
  scopes?: string[];
9
9
  createTenantForNewUser?: boolean;
10
10
  parseQueryParams?: boolean;
11
+ isDiscoveringAppId?: boolean;
12
+ hasSettingsError?: boolean;
11
13
  };
12
14
  export type PassflowAction = {
13
15
  type: 'SET_PASSFLOW_STATE';
@@ -1 +1 @@
1
- {"version":3,"file":"passflow-context.d.ts","sourceRoot":"","sources":["../../../src/context/passflow-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,OAAO,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAEpF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,aAQ1B,CAAC;AAEF,eAAO,MAAM,eAAe,0DAA4D,CAAC;AAEzF,eAAO,MAAM,eAAe,GAAI,OAAO,aAAa,EAAE,QAAQ,cAAc,KAAG,aAO9E,CAAC"}
1
+ {"version":3,"file":"passflow-context.d.ts","sourceRoot":"","sources":["../../../src/context/passflow-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,OAAO,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAEpF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,aAU1B,CAAC;AAEF,eAAO,MAAM,eAAe,0DAA4D,CAAC;AAEzF,eAAO,MAAM,eAAe,GAAI,OAAO,aAAa,EAAE,QAAQ,cAAc,KAAG,aAO9E,CAAC"}
@@ -26,5 +26,17 @@ export declare const routes: {
26
26
  passkey: {
27
27
  path: string;
28
28
  };
29
+ two_factor_verify: {
30
+ path: string;
31
+ };
32
+ two_factor_recovery: {
33
+ path: string;
34
+ };
35
+ two_factor_setup: {
36
+ path: string;
37
+ };
38
+ two_factor_setup_magic_link: {
39
+ path: string;
40
+ };
29
41
  };
30
42
  //# sourceMappingURL=router-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"router-context.d.ts","sourceRoot":"","sources":["../../../src/context/router-context.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlB,CAAC"}
1
+ {"version":3,"file":"router-context.d.ts","sourceRoot":"","sources":["../../../src/context/router-context.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwClB,CAAC"}
@@ -3,6 +3,6 @@ import { PassflowProps } from '../components/flow/passflow';
3
3
  import { TInvitationJoinFlow, TSignIn, TSignUp } from '../components/form';
4
4
  import { default as React, ComponentType } from 'react';
5
5
  type UnionType = TSignIn | TSignUp | TInvitationJoinFlow | PassflowProps;
6
- export declare const withError: <P extends UnionType>(Component: ComponentType<P>, ErrorComponent: ComponentType<TError>) => (props: P) => React.JSX.Element;
6
+ export declare const withError: <P extends UnionType>(Component: ComponentType<P>, ErrorComponent: ComponentType<TError>) => (props: P) => React.JSX.Element | null;
7
7
  export default withError;
8
8
  //# sourceMappingURL=with-error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"with-error.d.ts","sourceRoot":"","sources":["../../../src/hocs/with-error.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,OAAO,CAAC;AAGvD,KAAK,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,mBAAmB,GAAG,aAAa,CAAC;AAQzE,eAAO,MAAM,SAAS,GACnB,CAAC,SAAS,SAAS,EAAE,WAAW,aAAa,CAAC,CAAC,CAAC,EAAE,gBAAgB,aAAa,CAAC,MAAM,CAAC,MACvF,OAAO,CAAC,sBAoBR,CAAC;AAEJ,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"with-error.d.ts","sourceRoot":"","sources":["../../../src/hocs/with-error.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,OAAO,CAAC;AAGvD,KAAK,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,mBAAmB,GAAG,aAAa,CAAC;AAQzE,eAAO,MAAM,SAAS,GACnB,CAAC,SAAS,SAAS,EAAE,WAAW,aAAa,CAAC,CAAC,CAAC,EAAE,gBAAgB,aAAa,CAAC,MAAM,CAAC,MACvF,OAAO,CAAC,6BAyCR,CAAC;AAEJ,eAAe,SAAS,CAAC"}
@@ -13,4 +13,9 @@ export { useAuthCloudRedirect } from './use-auth-cloud-redirect';
13
13
  export { useJoinInvite } from './use-join-invite';
14
14
  export { useOutsideClick } from './use-outsideclick';
15
15
  export { useNavigation } from './use-navigation';
16
+ export { useTwoFactorStatus, type UseTwoFactorStatusProps } from './use-two-factor-status';
17
+ export { useTwoFactorSetup, type UseTwoFactorSetupProps, type TwoFactorSetupStep } from './use-two-factor-setup';
18
+ export { useTwoFactorVerify, type UseTwoFactorVerifyProps } from './use-two-factor-verify';
19
+ export { useTwoFactorManage, type UseTwoFactorManageProps } from './use-two-factor-manage';
20
+ export { useTwoFactorSetupMagicLink, type UseTwoFactorSetupMagicLinkReturn } from './use-two-factor-setup-magic-link';
16
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,KAAK,gCAAgC,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-app-settings.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-app-settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,EAC/B,MAAM,gBAAgB,CAAC;AAKxB,MAAM,MAAM,mBAAmB,GAAG,MAAM;IACtC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC,CAAC;AAMF,eAAO,MAAM,cAAc,EAAE,mBAuH5B,CAAC"}
1
+ {"version":3,"file":"use-app-settings.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-app-settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,EAC/B,MAAM,gBAAgB,CAAC;AAKxB,MAAM,MAAM,mBAAmB,GAAG,MAAM;IACtC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC,CAAC;AAMF,eAAO,MAAM,cAAc,EAAE,mBAgP5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-passflow-store.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-passflow-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,aAAa,EAAsB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI1F,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,sBAIxD"}
1
+ {"version":3,"file":"use-passflow-store.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-passflow-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,aAAa,EAA4C,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIhH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,sBAIxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-signin.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-signin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,4BAA4B,EAC5B,iCAAiC,EACjC,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,cAAc,GAAG,MAAM;IACjC,KAAK,EAAE,CACL,OAAO,EAAE,uCAAuC,GAAG,qBAAqB,GAAG,iCAAiC,EAC5G,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,KAC1C,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,4BAA4B,CAAC,CAAC;IAC9D,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cA8CvB,CAAC"}
1
+ {"version":3,"file":"use-signin.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-signin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,4BAA4B,EAC5B,iCAAiC,EACjC,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,cAAc,GAAG,MAAM;IACjC,KAAK,EAAE,CACL,OAAO,EAAE,uCAAuC,GAAG,qBAAqB,GAAG,iCAAiC,EAC5G,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,KAC1C,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,4BAA4B,CAAC,CAAC;IAC9D,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cA0CvB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { TwoFactorRegenerateResponse } from '@passflow/core';
2
+ export type UseTwoFactorManageProps = () => {
3
+ recoveryCodes: string[];
4
+ disable: (code: string) => Promise<boolean>;
5
+ regenerateCodes: (code: string) => Promise<TwoFactorRegenerateResponse | null>;
6
+ reset: () => void;
7
+ isLoading: boolean;
8
+ isError: boolean;
9
+ error: string;
10
+ };
11
+ /**
12
+ * Hook to manage 2FA (disable, regenerate codes)
13
+ */
14
+ export declare const useTwoFactorManage: UseTwoFactorManageProps;
15
+ //# sourceMappingURL=use-two-factor-manage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-two-factor-manage.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-manage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAIlE,MAAM,MAAM,uBAAuB,GAAG,MAAM;IAC1C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC,CAAC;IAC/E,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBA+DhC,CAAC"}
@@ -0,0 +1,55 @@
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
+ };
9
+ /**
10
+ * Return type for useTwoFactorSetupMagicLink hook
11
+ */
12
+ export type UseTwoFactorSetupMagicLinkReturn = {
13
+ /** True during validation */
14
+ isLoading: boolean;
15
+ /** True during retry attempt */
16
+ isRetrying: boolean;
17
+ /** True if token validated successfully */
18
+ isValidated: boolean;
19
+ /** Error details if validation failed */
20
+ error: TwoFactorSetupMagicLinkError | null;
21
+ /** Session token if validated */
22
+ sessionToken: string | null;
23
+ /** User ID if validated */
24
+ userId: string | null;
25
+ /** App ID if validated (may be null) */
26
+ appId: string | null;
27
+ /** Session expiration in seconds */
28
+ expiresIn: number | null;
29
+ /** Retry countdown for rate-limited errors (null if not rate limited) */
30
+ retryCountdown: number | null;
31
+ /** Manual retry function for transient errors */
32
+ retry: () => Promise<void>;
33
+ };
34
+ /**
35
+ * Hook to validate magic link token for 2FA setup
36
+ *
37
+ * This hook:
38
+ * - Validates token on mount (automatic)
39
+ * - Caches validation result per token (prevents duplicate calls)
40
+ * - Provides loading, error, and success states
41
+ * - Allows manual retry for transient failures
42
+ * - Handles rate limit countdown
43
+ * - Cleans up conditionally on unmount (only if validation failed or not validated)
44
+ *
45
+ * Usage:
46
+ * ```tsx
47
+ * const { isLoading, isValidated, error, retry, retryCountdown } = useTwoFactorSetupMagicLink(token);
48
+ *
49
+ * if (isLoading) return <Loading />;
50
+ * if (error) return <ErrorUI error={error} onRetry={retry} countdown={retryCountdown} />;
51
+ * if (isValidated) return <TwoFactorSetupForm />;
52
+ * ```
53
+ */
54
+ export declare const useTwoFactorSetupMagicLink: (token: string) => UseTwoFactorSetupMagicLinkReturn;
55
+ //# sourceMappingURL=use-two-factor-setup-magic-link.d.ts.map
@@ -0,0 +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,GAAI,OAAO,MAAM,KAAG,gCA6K1D,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { TwoFactorConfirmResponse, TwoFactorSetupResponse } from '@passflow/core';
2
+ export type TwoFactorSetupStep = 'idle' | 'setup' | 'complete';
3
+ export type UseTwoFactorSetupProps = () => {
4
+ setupData: TwoFactorSetupResponse | null;
5
+ recoveryCodes: string[];
6
+ step: TwoFactorSetupStep;
7
+ beginSetup: () => Promise<TwoFactorSetupResponse | null>;
8
+ confirmSetup: (code: string) => Promise<TwoFactorConfirmResponse | null>;
9
+ reset: () => void;
10
+ isLoading: boolean;
11
+ isError: boolean;
12
+ error: string;
13
+ };
14
+ /**
15
+ * Hook to handle 2FA setup flow (enable 2FA)
16
+ */
17
+ export declare const useTwoFactorSetup: UseTwoFactorSetupProps;
18
+ //# sourceMappingURL=use-two-factor-setup.d.ts.map
@@ -0,0 +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,GAAG,MAAM;IACzC,SAAS,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IACzE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,sBAqE/B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { TwoFactorStatusResponse } from '@passflow/core';
2
+ export type UseTwoFactorStatusProps = () => {
3
+ data: TwoFactorStatusResponse | null;
4
+ refetch: () => Promise<TwoFactorStatusResponse | null>;
5
+ isLoading: boolean;
6
+ isError: boolean;
7
+ errorMessage: string;
8
+ };
9
+ /**
10
+ * Hook to get the current 2FA enrollment status
11
+ */
12
+ export declare const useTwoFactorStatus: UseTwoFactorStatusProps;
13
+ //# sourceMappingURL=use-two-factor-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-two-factor-status.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAI9D,MAAM,MAAM,uBAAuB,GAAG,MAAM;IAC1C,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBAoChC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { TwoFactorError, TwoFactorErrorType } from '../types/two-factor-errors';
2
+ import { TwoFactorRecoveryResponse, TwoFactorVerifyResponse } from '@passflow/core';
3
+ export type UseTwoFactorVerifyProps = () => {
4
+ isVerificationRequired: () => boolean;
5
+ verify: (code: string) => Promise<TwoFactorVerifyResponse | null>;
6
+ useRecoveryCode: (code: string) => Promise<TwoFactorRecoveryResponse | null>;
7
+ reset: () => void;
8
+ isLoading: boolean;
9
+ isError: boolean;
10
+ error: string;
11
+ errorType: TwoFactorErrorType | null;
12
+ errorDetails: TwoFactorError | null;
13
+ };
14
+ /**
15
+ * Hook to verify 2FA code during login with error classification
16
+ */
17
+ export declare const useTwoFactorVerify: UseTwoFactorVerifyProps;
18
+ //# sourceMappingURL=use-two-factor-verify.d.ts.map
@@ -0,0 +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,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAIzF,MAAM,MAAM,uBAAuB,GAAG,MAAM;IAC1C,sBAAsB,EAAE,MAAM,OAAO,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IAClE,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IAC7E,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"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/test/setup.ts"],"names":[],"mappings":"AAEA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { RenderResult } from '@testing-library/react';
2
+ import { ReactElement } from 'react';
3
+ export declare function render(ui: ReactElement): RenderResult;
4
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,wBAAgB,MAAM,CAAC,EAAE,EAAE,YAAY,GAAG,YAAY,CAErD"}
@@ -0,0 +1,6 @@
1
+ import { Mock } from 'vitest';
2
+ type MockFn = Mock<(...args: any[]) => any>;
3
+ export declare const createMockPassflow: () => Record<string, MockFn>;
4
+ export type MockPassflow = ReturnType<typeof createMockPassflow>;
5
+ export {};
6
+ //# sourceMappingURL=test-passflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-passflow.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/test-passflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAM,MAAM,QAAQ,CAAC;AAEvC,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;AAE5C,eAAO,MAAM,kBAAkB,QAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAmBzD,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -2,4 +2,5 @@ export type PreferIdentity = 'identity' | 'phone' | 'none';
2
2
  export type DefaultMethod = 'email_or_username' | 'phone';
3
3
  export type PreferChallenge = 'passkey' | 'password' | 'otp' | 'magic_link';
4
4
  export type SuccessAuthRedirect = string;
5
+ export type { TwoFactorErrorType, TwoFactorError } from './two-factor-errors';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Types of 2FA errors with different handling strategies
3
+ */
4
+ export type TwoFactorErrorType = 'expired' | 'not_enabled' | 'invalid_code' | 'generic';
5
+ /**
6
+ * Structured error information for 2FA errors
7
+ */
8
+ export type TwoFactorError = {
9
+ type: TwoFactorErrorType;
10
+ message: string;
11
+ isRecoverable: boolean;
12
+ shouldAutoRedirect: boolean;
13
+ };
14
+ //# sourceMappingURL=two-factor-errors.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
1
+ import { TwoFactorError } from '../types/two-factor-errors';
2
+ /**
3
+ * Classify 2FA error based on error message
4
+ *
5
+ * @param errorMessage - Error message from SDK
6
+ * @returns Classified error with handling strategy
7
+ */
8
+ export declare function classifyTwoFactorError(errorMessage: string): TwoFactorError;
9
+ /**
10
+ * Get user-friendly error message based on error type
11
+ */
12
+ export declare function getUserFriendlyErrorMessage(error: TwoFactorError): string;
13
+ //# sourceMappingURL=classify-two-factor-error.d.ts.map
@@ -0,0 +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,CAYzE"}
@@ -1,3 +1,3 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  export declare const cn: (...classes: ClassValue[]) => string;
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=cn.d.ts.map