@passflow/react 0.0.1 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1450 -136
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/index.d.ts +1 -0
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup/index.d.ts +10 -0
- package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -0
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +35 -0
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -0
- package/dist/src/components/flow/two-factor-verify/index.d.ts +10 -0
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -0
- package/dist/src/components/form/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/src/components/form/index.d.ts +2 -0
- package/dist/src/components/form/index.d.ts.map +1 -1
- package/dist/src/components/form/invitation-join/index.d.ts +1 -1
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.ts +2 -1
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.ts +1 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-setup/index.d.ts +2 -0
- package/dist/src/components/form/two-factor-setup/index.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +9 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-verify/index.d.ts +3 -0
- package/dist/src/components/form/two-factor-verify/index.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +11 -0
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +14 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/{varify-challenge-otp-redirect.d.ts → verify-challenge-otp-redirect.d.ts} +1 -1
- package/dist/src/components/form/verify-challenge/{varify-challenge-otp-redirect.d.ts.map → verify-challenge-otp-redirect.d.ts.map} +1 -1
- package/dist/src/components/form/verify-challenge/{varify-challenge-success.d.ts → verify-challenge-success.d.ts} +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +1 -0
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/context/passflow-context.d.ts +2 -0
- package/dist/src/context/passflow-context.d.ts.map +1 -1
- package/dist/src/context/router-context.d.ts +12 -0
- package/dist/src/context/router-context.d.ts.map +1 -1
- package/dist/src/hocs/with-error.d.ts +1 -1
- package/dist/src/hocs/with-error.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +5 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
- package/dist/src/hooks/use-passflow-store.d.ts.map +1 -1
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-manage.d.ts +15 -0
- package/dist/src/hooks/use-two-factor-manage.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts +55 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-setup.d.ts +18 -0
- package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-status.d.ts +13 -0
- package/dist/src/hooks/use-two-factor-status.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-verify.d.ts +18 -0
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -0
- package/dist/src/test/setup.d.ts +1 -0
- package/dist/src/test/setup.d.ts.map +1 -0
- package/dist/src/test/utils/render.d.ts +4 -0
- package/dist/src/test/utils/render.d.ts.map +1 -0
- package/dist/src/test/utils/test-passflow.d.ts +6 -0
- package/dist/src/test/utils/test-passflow.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/two-factor-errors.d.ts +14 -0
- package/dist/src/types/two-factor-errors.d.ts.map +1 -0
- package/dist/src/utils/classify-two-factor-error.d.ts +13 -0
- package/dist/src/utils/classify-two-factor-error.d.ts.map +1 -0
- package/dist/src/utils/{cn/index.d.ts → cn.d.ts} +1 -1
- package/dist/src/utils/cn.d.ts.map +1 -0
- package/dist/src/utils/{get-app-version/index.d.ts → get-app-version.d.ts} +1 -1
- package/dist/src/utils/get-app-version.d.ts.map +1 -0
- package/dist/src/utils/{get-auth-methods/index.d.ts → get-auth-methods.d.ts} +1 -1
- package/dist/src/utils/get-auth-methods.d.ts.map +1 -0
- package/dist/src/utils/{get-form-labels/index.d.ts → get-form-labels.d.ts} +3 -3
- package/dist/src/utils/get-form-labels.d.ts.map +1 -0
- package/dist/src/utils/{get-url-errors/index.d.ts → get-url-errors.d.ts} +1 -1
- package/dist/src/utils/get-url-errors.d.ts.map +1 -0
- package/dist/src/utils/get-url-with-tokens.d.ts +4 -0
- package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +3 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/two-factor-loop-prevention.d.ts +40 -0
- package/dist/src/utils/two-factor-loop-prevention.d.ts.map +1 -0
- package/dist/src/utils/{undefined-on-catch/index.d.ts → undefined-on-catch.d.ts} +1 -1
- package/dist/src/utils/undefined-on-catch.d.ts.map +1 -0
- package/dist/src/utils/{url-params/index.d.ts → url-params.d.ts} +1 -1
- package/dist/src/utils/url-params.d.ts.map +1 -0
- package/dist/src/utils/{validate-url/index.d.ts → validate-url.d.ts} +1 -1
- package/dist/src/utils/validate-url.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +31 -31
- package/dist/src/components/form/verify-challenge/varify-challenge-success.d.ts.map +0 -1
- package/dist/src/utils/cn/index.d.ts.map +0 -1
- package/dist/src/utils/get-app-version/index.d.ts.map +0 -1
- package/dist/src/utils/get-auth-methods/index.d.ts.map +0 -1
- package/dist/src/utils/get-form-labels/index.d.ts.map +0 -1
- package/dist/src/utils/get-url-errors/index.d.ts.map +0 -1
- package/dist/src/utils/get-url-with-tokens/index.d.ts +0 -3
- package/dist/src/utils/get-url-with-tokens/index.d.ts.map +0 -1
- package/dist/src/utils/undefined-on-catch/index.d.ts.map +0 -1
- package/dist/src/utils/url-params/index.d.ts.map +0 -1
- package/dist/src/utils/validate-url/index.d.ts.map +0 -1
|
@@ -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":"
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAKzC,OAAO,oBAAoB,CAAC;AAY5B,KAAK,eAAe,GAAG;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAKzC,OAAO,oBAAoB,CAAC;AAY5B,KAAK,eAAe,GAAG;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CA6L9C,CAAC"}
|
|
@@ -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;
|
|
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;AAmHF,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,
|
|
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,CA0I5C,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;
|
|
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,CAkflC,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,
|
|
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,CAmflC,CAAC;AAEF,eAAO,MAAM,MAAM,8CAAwC,CAAC"}
|
|
@@ -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 @@
|
|
|
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,CA4JhE,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-challenge-otp-manual.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-manual.tsx"],"names":[],"mappings":"AAWA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAM5D,OAAO,oBAAoB,CAAC;AAE5B,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAOF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,
|
|
1
|
+
{"version":3,"file":"verify-challenge-otp-manual.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-manual.tsx"],"names":[],"mappings":"AAWA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAM5D,OAAO,oBAAoB,CAAC;AAE5B,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAOF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAyHtE,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=
|
|
9
|
+
//# sourceMappingURL=verify-challenge-otp-redirect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
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"}
|
|
@@ -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,
|
|
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,CAwGtD,CAAC"}
|
|
@@ -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,
|
|
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
|
|
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,
|
|
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,
|
|
1
|
+
{"version":3,"file":"use-app-settings.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-app-settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAKtH,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,mBA8O5B,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,
|
|
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,
|
|
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,gCAiL1D,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 @@
|
|
|
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"}
|