@passflow/react 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +135 -143
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.cts +0 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts +0 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/screen.d.cts +5 -0
- package/dist/src/components/flow/two-factor-verify/screen.d.ts +5 -0
- package/dist/src/components/flow/two-factor-verify/screen.d.ts.map +1 -0
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-setup/setup-screen.d.cts +29 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts +29 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +3 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +3 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +5 -2
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +5 -2
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +5 -3
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +5 -3
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/index.d.cts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/login-screen.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/shared.d.cts +4 -0
- package/dist/src/components/ui/login-screen/shared.d.ts +4 -0
- package/dist/src/components/ui/login-screen/shared.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/status.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/two-factor-code.d.cts +8 -0
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts +8 -0
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.cts +5 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts +5 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.cts +4 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.ts +4 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/types.d.cts +115 -6
- package/dist/src/components/ui/login-screen/types.d.ts +115 -6
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-enrollment.d.cts +58 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts +58 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +5 -15
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts +5 -15
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
- package/dist/src/types/two-factor-errors.d.cts +1 -2
- package/dist/src/types/two-factor-errors.d.ts +1 -2
- package/dist/src/types/two-factor-errors.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +23 -0
- package/dist/src/utils/auth-error.d.ts +23 -0
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/classify-two-factor-error.d.cts +5 -6
- package/dist/src/utils/classify-two-factor-error.d.ts +5 -6
- package/dist/src/utils/classify-two-factor-error.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +3 -3
- package/dist/src/utils/index.d.ts +3 -3
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/second-factor.d.cts +7 -1
- package/dist/src/utils/second-factor.d.ts +7 -1
- package/dist/src/utils/second-factor.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"AAeA,OAAO,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,EAOL,KAAK,YAAY,EAEjB,KAAK,YAAY,EAOlB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,YAAY,IAAI,oBAAoB,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEhH,KAAK,iBAAiB,GAAG;IACvB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CACI;IACE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE;;;;;OAKG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;CACxB,CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"AAeA,OAAO,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,EAOL,KAAK,YAAY,EAEjB,KAAK,YAAY,EAOlB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,YAAY,IAAI,oBAAoB,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEhH,KAAK,iBAAiB,GAAG;IACvB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CACI;IACE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE;;;;;OAKG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;CACxB,CACJ,CAAC;AAyQJ,eAAO,MAAM,YAAY,8DAA6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup-magic-link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup-magic-link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,EAAE,KAAK,gCAAgC,EAA6C,MAAM,SAAS,CAAC;AAS3G,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;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,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;AAuDF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,gCAAgC,CAkD5E,CAAC"}
|
|
@@ -3,8 +3,6 @@ import type { SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
|
3
3
|
type TwoFactorVerifyFlowProps = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
signInPath?: string;
|
|
6
|
-
twoFactorSetupPath?: string;
|
|
7
|
-
useV2Flow?: boolean;
|
|
8
6
|
};
|
|
9
7
|
export declare const TwoFactorVerifyFlow: FC<TwoFactorVerifyFlowProps>;
|
|
10
8
|
export {};
|
|
@@ -3,8 +3,6 @@ import type { SuccessAuthRedirect } from '../../../types/index.js';
|
|
|
3
3
|
type TwoFactorVerifyFlowProps = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
signInPath?: string;
|
|
6
|
-
twoFactorSetupPath?: string;
|
|
7
|
-
useV2Flow?: boolean;
|
|
8
6
|
};
|
|
9
7
|
export declare const TwoFactorVerifyFlow: FC<TwoFactorVerifyFlowProps>;
|
|
10
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-verify/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-verify/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,OAAO,oBAAoB,CAAC;AAE5B,KAAK,wBAAwB,GAAG;IAC9B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA6D5D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LoginScreenProps } from '../../ui/index.cjs';
|
|
2
|
+
import { type UseTwoFactorEnrollmentReturn } from '../../../hooks/use-two-factor-enrollment.cjs';
|
|
3
|
+
/** The screen for the enrolment state; null on `verify`, which the verify and recovery forms draw. */
|
|
4
|
+
export declare const getTwoFactorEnrollmentScreenProps: (enrollment: UseTwoFactorEnrollmentReturn, onBackToSignIn: () => void) => LoginScreenProps | null;
|
|
5
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LoginScreenProps } from '../../ui/index.js';
|
|
2
|
+
import { type UseTwoFactorEnrollmentReturn } from '../../../hooks/use-two-factor-enrollment.js';
|
|
3
|
+
/** The screen for the enrolment state; null on `verify`, which the verify and recovery forms draw. */
|
|
4
|
+
export declare const getTwoFactorEnrollmentScreenProps: (enrollment: UseTwoFactorEnrollmentReturn, onBackToSignIn: () => void) => LoginScreenProps | null;
|
|
5
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-verify/screen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAA6B,KAAK,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAKjH,sGAAsG;AACtG,eAAO,MAAM,iCAAiC,eAChC,4BAA4B,kBACxB,MAAM,IAAI,KACzB,gBAAgB,GAAG,IA2GrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/reset-password/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,oBAAoB,CAAC;AAM5B,KAAK,cAAc,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAWF,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":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,oBAAoB,CAAC;AAM5B,KAAK,cAAc,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAWF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CA+G5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmDrE,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,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmDrE,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,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,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,CA8OlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signup/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAuDpF,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,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,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":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAuDpF,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,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CA4NlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-challenge/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,uBAAuB,GAAG;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-challenge/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,uBAAuB,GAAG;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAgL1D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TwoFactorSetupResponse } from '@passflow/core';
|
|
2
|
+
import type { LoginScreenAction, LoginScreenProps } from '../../ui/index.cjs';
|
|
3
|
+
type SetupScreenStatus = {
|
|
4
|
+
busy: boolean;
|
|
5
|
+
error?: string | null;
|
|
6
|
+
};
|
|
7
|
+
type StartScreenProps = SetupScreenStatus & {
|
|
8
|
+
secondaryAction?: LoginScreenAction;
|
|
9
|
+
onStart: () => void;
|
|
10
|
+
};
|
|
11
|
+
type CodeScreenProps = SetupScreenStatus & {
|
|
12
|
+
data: TwoFactorSetupResponse;
|
|
13
|
+
/** Used when the server named no digit count. */
|
|
14
|
+
fallbackDigits?: number;
|
|
15
|
+
/** Tells the user something without marking the code invalid. An `error` takes its place. */
|
|
16
|
+
notice?: string;
|
|
17
|
+
secondaryAction?: LoginScreenAction;
|
|
18
|
+
onSubmit: (code: string) => void;
|
|
19
|
+
};
|
|
20
|
+
type RecoveryCodesScreenProps = SetupScreenStatus & {
|
|
21
|
+
codes: string[];
|
|
22
|
+
onContinue: () => void;
|
|
23
|
+
};
|
|
24
|
+
/** Direct enrolment and the setup link page share these, so both look the same. */
|
|
25
|
+
export declare const getTwoFactorSetupStartScreen: ({ busy, error, secondaryAction, onStart, }: StartScreenProps) => LoginScreenProps;
|
|
26
|
+
export declare const getTwoFactorSetupCodeScreen: ({ data, fallbackDigits, notice, busy, error, secondaryAction, onSubmit, }: CodeScreenProps) => LoginScreenProps;
|
|
27
|
+
export declare const getTwoFactorRecoveryCodesScreen: ({ codes, busy, error, onContinue, }: RecoveryCodesScreenProps) => LoginScreenProps;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=setup-screen.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TwoFactorSetupResponse } from '@passflow/core';
|
|
2
|
+
import type { LoginScreenAction, LoginScreenProps } from '../../ui/index.js';
|
|
3
|
+
type SetupScreenStatus = {
|
|
4
|
+
busy: boolean;
|
|
5
|
+
error?: string | null;
|
|
6
|
+
};
|
|
7
|
+
type StartScreenProps = SetupScreenStatus & {
|
|
8
|
+
secondaryAction?: LoginScreenAction;
|
|
9
|
+
onStart: () => void;
|
|
10
|
+
};
|
|
11
|
+
type CodeScreenProps = SetupScreenStatus & {
|
|
12
|
+
data: TwoFactorSetupResponse;
|
|
13
|
+
/** Used when the server named no digit count. */
|
|
14
|
+
fallbackDigits?: number;
|
|
15
|
+
/** Tells the user something without marking the code invalid. An `error` takes its place. */
|
|
16
|
+
notice?: string;
|
|
17
|
+
secondaryAction?: LoginScreenAction;
|
|
18
|
+
onSubmit: (code: string) => void;
|
|
19
|
+
};
|
|
20
|
+
type RecoveryCodesScreenProps = SetupScreenStatus & {
|
|
21
|
+
codes: string[];
|
|
22
|
+
onContinue: () => void;
|
|
23
|
+
};
|
|
24
|
+
/** Direct enrolment and the setup link page share these, so both look the same. */
|
|
25
|
+
export declare const getTwoFactorSetupStartScreen: ({ busy, error, secondaryAction, onStart, }: StartScreenProps) => LoginScreenProps;
|
|
26
|
+
export declare const getTwoFactorSetupCodeScreen: ({ data, fallbackDigits, notice, busy, error, secondaryAction, onSubmit, }: CodeScreenProps) => LoginScreenProps;
|
|
27
|
+
export declare const getTwoFactorRecoveryCodesScreen: ({ codes, busy, error, onContinue, }: RecoveryCodesScreenProps) => LoginScreenProps;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=setup-screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-setup/setup-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAI3E,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,iBAAiB,GAAG;IAC1C,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,eAAe,GAAG,iBAAiB,GAAG;IACzC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,KAAK,wBAAwB,GAAG,iBAAiB,GAAG;IAClD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,4BAA4B,+CAKtC,gBAAgB,KAAG,gBAgBpB,CAAC;AAEH,eAAO,MAAM,2BAA2B,8EAQrC,eAAe,KAAG,gBAiCpB,CAAC;AAEF,eAAO,MAAM,+BAA+B,wCAKzC,wBAAwB,KAAG,gBAkB5B,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
type TwoFactorSetupFormProps = {
|
|
3
3
|
onComplete?: (recoveryCodes: string[]) => void;
|
|
4
|
+
/** The way out of the first step only. */
|
|
4
5
|
onCancel?: () => void;
|
|
6
|
+
/** The way out of the first step and the code step, labelled Back to sign in. */
|
|
7
|
+
onBackToSignIn?: () => void;
|
|
5
8
|
numInputs?: number;
|
|
6
9
|
};
|
|
7
10
|
export declare const TwoFactorSetupForm: FC<TwoFactorSetupFormProps>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
type TwoFactorSetupFormProps = {
|
|
3
3
|
onComplete?: (recoveryCodes: string[]) => void;
|
|
4
|
+
/** The way out of the first step only. */
|
|
4
5
|
onCancel?: () => void;
|
|
6
|
+
/** The way out of the first step and the code step, labelled Back to sign in. */
|
|
7
|
+
onBackToSignIn?: () => void;
|
|
5
8
|
numInputs?: number;
|
|
6
9
|
};
|
|
7
10
|
export declare const TwoFactorSetupForm: FC<TwoFactorSetupFormProps>;
|
|
@@ -1 +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":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
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":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,oBAAoB,CAAC;AAE5B,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiD1D,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
type TwoFactorRecoveryFormProps = {
|
|
3
3
|
onSuccess?: () => void;
|
|
4
4
|
onBack?: () => void;
|
|
5
|
+
/** The server ended the sign-in, or locked it for too many attempts. The form still shows why when this is not handled. */
|
|
6
|
+
onEnded?: (type: 'expired' | 'rate_limited') => void;
|
|
7
|
+
/** The way out once no further code can be taken. */
|
|
8
|
+
onBackToSignIn?: () => void;
|
|
5
9
|
title?: string;
|
|
6
10
|
subtitle?: string;
|
|
7
|
-
signInPath?: string;
|
|
8
11
|
/** Label of the "trust this device" option, unticked by default. */
|
|
9
12
|
trustDeviceLabel?: string;
|
|
10
13
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
type TwoFactorRecoveryFormProps = {
|
|
3
3
|
onSuccess?: () => void;
|
|
4
4
|
onBack?: () => void;
|
|
5
|
+
/** The server ended the sign-in, or locked it for too many attempts. The form still shows why when this is not handled. */
|
|
6
|
+
onEnded?: (type: 'expired' | 'rate_limited') => void;
|
|
7
|
+
/** The way out once no further code can be taken. */
|
|
8
|
+
onBackToSignIn?: () => void;
|
|
5
9
|
title?: string;
|
|
6
10
|
subtitle?: string;
|
|
7
|
-
signInPath?: string;
|
|
8
11
|
/** Label of the "trust this device" option, unticked by default. */
|
|
9
12
|
trustDeviceLabel?: string;
|
|
10
13
|
};
|
|
@@ -1 +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":"AAAA,OAAO,KAAK,
|
|
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":"AAAA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAU7D,OAAO,oBAAoB,CAAC;AAE5B,KAAK,0BAA0B,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,2HAA2H;IAC3H,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,KAAK,IAAI,CAAC;IACrD,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAKF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA+DhE,CAAC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
type TwoFactorVerifyFormProps = {
|
|
3
3
|
onSuccess?: () => void;
|
|
4
4
|
onUseRecovery?: () => void;
|
|
5
|
+
/** The server ended the sign-in, or locked it for too many attempts. The form still shows why when this is not handled. */
|
|
6
|
+
onEnded?: (type: 'expired' | 'rate_limited') => void;
|
|
7
|
+
/** The way out once no further code can be taken. */
|
|
8
|
+
onBackToSignIn?: () => void;
|
|
5
9
|
title?: string;
|
|
6
10
|
subtitle?: string;
|
|
7
11
|
numInputs?: number;
|
|
8
12
|
shouldAutoFocus?: boolean;
|
|
9
|
-
signInPath?: string;
|
|
10
|
-
twoFactorSetupPath?: string;
|
|
11
13
|
/** Label of the "trust this device" option, unticked by default. */
|
|
12
14
|
trustDeviceLabel?: string;
|
|
13
15
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
type TwoFactorVerifyFormProps = {
|
|
3
3
|
onSuccess?: () => void;
|
|
4
4
|
onUseRecovery?: () => void;
|
|
5
|
+
/** The server ended the sign-in, or locked it for too many attempts. The form still shows why when this is not handled. */
|
|
6
|
+
onEnded?: (type: 'expired' | 'rate_limited') => void;
|
|
7
|
+
/** The way out once no further code can be taken. */
|
|
8
|
+
onBackToSignIn?: () => void;
|
|
5
9
|
title?: string;
|
|
6
10
|
subtitle?: string;
|
|
7
11
|
numInputs?: number;
|
|
8
12
|
shouldAutoFocus?: boolean;
|
|
9
|
-
signInPath?: string;
|
|
10
|
-
twoFactorSetupPath?: string;
|
|
11
13
|
/** Label of the "trust this device" option, unticked by default. */
|
|
12
14
|
trustDeviceLabel?: string;
|
|
13
15
|
};
|
|
@@ -1 +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":"AAAA,OAAO,KAAK,EAAE,
|
|
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":"AAAA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAK7D,OAAO,oBAAoB,CAAC;AAE5B,KAAK,wBAAwB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,2HAA2H;IAC3H,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,KAAK,IAAI,CAAC;IACrD,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAKF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAwE5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-challenge-magic-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-magic-link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAK9D,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-challenge-magic-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-magic-link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAgC,MAAM,OAAO,CAAC;AAK9D,OAAO,oBAAoB,CAAC;AA6L5B,KAAK,6BAA6B,GAAG;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAuBtE,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":"AAQA,OAAO,EAAE,KAAK,EAAE,EAA8B,MAAM,OAAO,CAAC;AAS5D,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;IAC7B,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":"AAQA,OAAO,EAAE,KAAK,EAAE,EAA8B,MAAM,OAAO,CAAC;AAS5D,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;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAOF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAiItE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-challenge-otp-redirect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-redirect.tsx"],"names":[],"mappings":"AAYA,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;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,0BAA0B,sDAKpC,+BAA+B,
|
|
1
|
+
{"version":3,"file":"verify-challenge-otp-redirect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-redirect.tsx"],"names":[],"mappings":"AAYA,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;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,0BAA0B,sDAKpC,+BAA+B,uCA+CjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passflow-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/provider/passflow-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EAKpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AACtH,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAGpG,OAAO,
|
|
1
|
+
{"version":3,"file":"passflow-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/provider/passflow-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EAKpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AACtH,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAGpG,OAAO,EAML,KAAK,gBAAgB,EAIrB,KAAK,UAAU,EAEhB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,oBAAoB,CAAC;AAE5B,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAEpG,KAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IAC3C;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,QAC6F,CAAC;AAiChI;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,uBAAuB,QAAO,OAA+B,CAAC;AAqK3E;;;GAGG;AACH,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;;;;;;GAMG;AACH,KAAK,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAmLtF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAwFF,eAAO,MAAM,mBAAmB,yCAE9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgKtD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { LoginScreen } from './login-screen.cjs';
|
|
2
2
|
export { LoginAlert } from './shared.cjs';
|
|
3
|
-
export type { LoginCodeEntryState, LoginConsentScope, LoginConsentState, LoginCredentialsState, LoginCredentialsValues, LoginDeviceApprovalState, LoginEmailCodeResend, LoginEmailCodeState, LoginGeneralErrorState, LoginIdentityMethod, LoginInvitationState, LoginMethodConfig, LoginNewPasswordState, LoginPasskeyProgressState, LoginPasswordlessApprovalFormState, LoginPasswordlessApprovalLoadingState, LoginPasswordlessApprovalState, LoginPasswordlessWaitingState, LoginScreenAction, LoginScreenChrome, LoginScreenLink, LoginScreenNotice as LoginScreenNoticeProps, LoginScreenProps, LoginScreenState, LoginSecondFactorMethod, LoginSecondFactorState, LoginStatusState, } from './types.cjs';
|
|
3
|
+
export type { LoginCodeEntryState, LoginConsentScope, LoginConsentState, LoginCredentialsState, LoginCredentialsValues, LoginDeviceApprovalState, LoginEmailCodeResend, LoginEmailCodeState, LoginGeneralErrorState, LoginIdentityMethod, LoginInvitationState, LoginMethodConfig, LoginNewPasswordState, LoginPasskeyProgressState, LoginPasswordlessApprovalFormState, LoginPasswordlessApprovalLoadingState, LoginPasswordlessApprovalState, LoginPasswordlessWaitingState, LoginScreenAction, LoginScreenChrome, LoginScreenLink, LoginScreenNotice as LoginScreenNoticeProps, LoginScreenProps, LoginScreenState, LoginSecondFactorMethod, LoginSecondFactorState, LoginStatusState, LoginTwoFactorCodeAlert, LoginTwoFactorCodeAlternate, LoginTwoFactorCodeFactor, LoginTwoFactorCodeState, LoginTwoFactorRecoveryCodesState, LoginTwoFactorSetupCodeState, LoginTwoFactorSetupStartState, LoginTwoFactorSetupState, LoginTwoFactorTrustDevice, } from './types.cjs';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { LoginScreen } from './login-screen.js';
|
|
2
2
|
export { LoginAlert } from './shared.js';
|
|
3
|
-
export type { LoginCodeEntryState, LoginConsentScope, LoginConsentState, LoginCredentialsState, LoginCredentialsValues, LoginDeviceApprovalState, LoginEmailCodeResend, LoginEmailCodeState, LoginGeneralErrorState, LoginIdentityMethod, LoginInvitationState, LoginMethodConfig, LoginNewPasswordState, LoginPasskeyProgressState, LoginPasswordlessApprovalFormState, LoginPasswordlessApprovalLoadingState, LoginPasswordlessApprovalState, LoginPasswordlessWaitingState, LoginScreenAction, LoginScreenChrome, LoginScreenLink, LoginScreenNotice as LoginScreenNoticeProps, LoginScreenProps, LoginScreenState, LoginSecondFactorMethod, LoginSecondFactorState, LoginStatusState, } from './types.js';
|
|
3
|
+
export type { LoginCodeEntryState, LoginConsentScope, LoginConsentState, LoginCredentialsState, LoginCredentialsValues, LoginDeviceApprovalState, LoginEmailCodeResend, LoginEmailCodeState, LoginGeneralErrorState, LoginIdentityMethod, LoginInvitationState, LoginMethodConfig, LoginNewPasswordState, LoginPasskeyProgressState, LoginPasswordlessApprovalFormState, LoginPasswordlessApprovalLoadingState, LoginPasswordlessApprovalState, LoginPasswordlessWaitingState, LoginScreenAction, LoginScreenChrome, LoginScreenLink, LoginScreenNotice as LoginScreenNoticeProps, LoginScreenProps, LoginScreenState, LoginSecondFactorMethod, LoginSecondFactorState, LoginStatusState, LoginTwoFactorCodeAlert, LoginTwoFactorCodeAlternate, LoginTwoFactorCodeFactor, LoginTwoFactorCodeState, LoginTwoFactorRecoveryCodesState, LoginTwoFactorSetupCodeState, LoginTwoFactorSetupStartState, LoginTwoFactorSetupState, LoginTwoFactorTrustDevice, } from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,kCAAkC,EAClC,qCAAqC,EACrC,8BAA8B,EAC9B,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,IAAI,sBAAsB,EAC3C,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,kCAAkC,EAClC,qCAAqC,EACrC,8BAA8B,EAC9B,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,IAAI,sBAAsB,EAC3C,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/login-screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"login-screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/login-screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkBhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6D5C,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import type { LoginScreenNotice as LoginScreenNoticeProps } from './types.cjs';
|
|
3
|
+
/** `error` is the default; `info` is a neutral note that is not announced as an alert. */
|
|
3
4
|
export declare const LoginAlert: FC<{
|
|
4
5
|
message?: string | null;
|
|
5
6
|
id?: string;
|
|
7
|
+
tone?: 'error' | 'info';
|
|
6
8
|
}>;
|
|
9
|
+
/** For a code input locked while a request is in flight: gives focus back when the request ends. */
|
|
10
|
+
export declare const useFocusAfterBusy: (busy: boolean) => import("react").RefObject<HTMLInputElement | null>;
|
|
7
11
|
export declare const LoginDivider: FC<{
|
|
8
12
|
label: string;
|
|
9
13
|
}>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import type { LoginScreenNotice as LoginScreenNoticeProps } from './types.js';
|
|
3
|
+
/** `error` is the default; `info` is a neutral note that is not announced as an alert. */
|
|
3
4
|
export declare const LoginAlert: FC<{
|
|
4
5
|
message?: string | null;
|
|
5
6
|
id?: string;
|
|
7
|
+
tone?: 'error' | 'info';
|
|
6
8
|
}>;
|
|
9
|
+
/** For a code input locked while a request is in flight: gives focus back when the request ends. */
|
|
10
|
+
export declare const useFocusAfterBusy: (busy: boolean) => import("react").RefObject<HTMLInputElement | null>;
|
|
7
11
|
export declare const LoginDivider: FC<{
|
|
8
12
|
label: string;
|
|
9
13
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAE3E,0FAA0F;AAC1F,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAAE,CAqB5F,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,SAAU,OAAO,uDAU9C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAM9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAElD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAKjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAcxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwD5C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { LoginTwoFactorCodeState } from './types.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Asking for a second factor at sign-in: authenticator boxes or a recovery code field, with the trust switch above
|
|
5
|
+
* them. The screen owns no code: a submit on the last digit belongs to the caller's `onCodeChange`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LoginTwoFactorCode: FC<LoginTwoFactorCodeState>;
|
|
8
|
+
//# sourceMappingURL=two-factor-code.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { LoginTwoFactorCodeState } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Asking for a second factor at sign-in: authenticator boxes or a recovery code field, with the trust switch above
|
|
5
|
+
* them. The screen owns no code: a submit on the last digit belongs to the caller's `onCodeChange`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LoginTwoFactorCode: FC<LoginTwoFactorCodeState>;
|
|
8
|
+
//# sourceMappingURL=two-factor-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"two-factor-code.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/two-factor-code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAQ3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA8G1D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { LoginTwoFactorRecoveryCodesState } from './types.cjs';
|
|
3
|
+
/** The recovery codes, shown once. They stay on screen through a failed `onContinue`, so they are not lost. */
|
|
4
|
+
export declare const LoginTwoFactorRecoveryCodes: FC<LoginTwoFactorRecoveryCodesState>;
|
|
5
|
+
//# sourceMappingURL=two-factor-recovery-codes.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { LoginTwoFactorRecoveryCodesState } from './types.js';
|
|
3
|
+
/** The recovery codes, shown once. They stay on screen through a failed `onContinue`, so they are not lost. */
|
|
4
|
+
export declare const LoginTwoFactorRecoveryCodes: FC<LoginTwoFactorRecoveryCodesState>;
|
|
5
|
+
//# sourceMappingURL=two-factor-recovery-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"two-factor-recovery-codes.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/two-factor-recovery-codes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE,+GAA+G;AAC/G,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,gCAAgC,CAoC5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"two-factor-setup.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/two-factor-setup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAK3C,OAAO,KAAK,EAIV,wBAAwB,EACzB,MAAM,SAAS,CAAC;AA4GjB,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CACiE,CAAC"}
|
|
@@ -182,6 +182,108 @@ export type LoginSecondFactorState = {
|
|
|
182
182
|
/** Called when the user switches factor, so a stale error can be cleared. */
|
|
183
183
|
onMethodChange?: () => void;
|
|
184
184
|
};
|
|
185
|
+
/** Which factor `two-factor-code` asks for: authenticator boxes, or a recovery code field. */
|
|
186
|
+
export type LoginTwoFactorCodeFactor = {
|
|
187
|
+
type: 'totp';
|
|
188
|
+
digits: number;
|
|
189
|
+
} | {
|
|
190
|
+
type: 'recovery';
|
|
191
|
+
placeholder?: string;
|
|
192
|
+
};
|
|
193
|
+
/** The line under the code. `error` marks the code invalid; `info` does not. */
|
|
194
|
+
export type LoginTwoFactorCodeAlert = {
|
|
195
|
+
message: string;
|
|
196
|
+
tone: 'error' | 'info';
|
|
197
|
+
};
|
|
198
|
+
/** The "trust this device" option. */
|
|
199
|
+
export type LoginTwoFactorTrustDevice = {
|
|
200
|
+
label: string;
|
|
201
|
+
checked: boolean;
|
|
202
|
+
onChange: (checked: boolean) => void;
|
|
203
|
+
};
|
|
204
|
+
/** The other factor: `prompt` is a sentence, `label` the link that follows it. */
|
|
205
|
+
export type LoginTwoFactorCodeAlternate = {
|
|
206
|
+
prompt: string;
|
|
207
|
+
label: string;
|
|
208
|
+
onClick: () => void;
|
|
209
|
+
};
|
|
210
|
+
/** Code entry at sign-in, for the verify and recovery forms. The code is controlled and all copy comes through props. */
|
|
211
|
+
export type LoginTwoFactorCodeState = {
|
|
212
|
+
kind: 'two-factor-code';
|
|
213
|
+
factor: LoginTwoFactorCodeFactor;
|
|
214
|
+
/** Names the code field. */
|
|
215
|
+
label: string;
|
|
216
|
+
code: string;
|
|
217
|
+
trustDevice: LoginTwoFactorTrustDevice;
|
|
218
|
+
/** A check is in flight: the code, the switch and every action are locked, and Verify shows `busyLabel`. */
|
|
219
|
+
busy?: boolean;
|
|
220
|
+
canSubmit: boolean;
|
|
221
|
+
/** No further code can be taken: the code and the switch are disabled, and Verify and `alternate` are gone. */
|
|
222
|
+
locked?: boolean;
|
|
223
|
+
alert?: LoginTwoFactorCodeAlert;
|
|
224
|
+
submitLabel: string;
|
|
225
|
+
busyLabel: string;
|
|
226
|
+
alternate?: LoginTwoFactorCodeAlternate;
|
|
227
|
+
/** The way out. It stays when `locked`. */
|
|
228
|
+
secondaryAction?: LoginScreenAction;
|
|
229
|
+
autoFocus?: boolean;
|
|
230
|
+
testId?: string;
|
|
231
|
+
onCodeChange: (code: string) => void;
|
|
232
|
+
onSubmit: () => void;
|
|
233
|
+
};
|
|
234
|
+
/** Enrolment before anything was requested from the server. */
|
|
235
|
+
export type LoginTwoFactorSetupStartState = {
|
|
236
|
+
kind: 'two-factor-setup';
|
|
237
|
+
step: 'start';
|
|
238
|
+
startLabel: string;
|
|
239
|
+
busyLabel: string;
|
|
240
|
+
busy?: boolean;
|
|
241
|
+
error?: string | null;
|
|
242
|
+
secondaryAction?: LoginScreenAction;
|
|
243
|
+
testId?: string;
|
|
244
|
+
onStart: () => void;
|
|
245
|
+
};
|
|
246
|
+
/** Enrolment with a secret: scan it or type it, then confirm a code. A new `secret` clears the typed code. */
|
|
247
|
+
export type LoginTwoFactorSetupCodeState = {
|
|
248
|
+
kind: 'two-factor-setup';
|
|
249
|
+
step: 'code';
|
|
250
|
+
/** Bare base64 PNG. When empty, no image shows and the secret is always visible. */
|
|
251
|
+
qrCode: string;
|
|
252
|
+
qrAlt: string;
|
|
253
|
+
secret: string;
|
|
254
|
+
/** Introduces the secret wherever it is visible. */
|
|
255
|
+
secretLabel: string;
|
|
256
|
+
showSecretLabel: string;
|
|
257
|
+
hideSecretLabel: string;
|
|
258
|
+
/** Digits in the code, from the server's `totp_digits`. */
|
|
259
|
+
digits: number;
|
|
260
|
+
/** Names the code field. */
|
|
261
|
+
codeLabel: string;
|
|
262
|
+
submitLabel: string;
|
|
263
|
+
busyLabel: string;
|
|
264
|
+
busy?: boolean;
|
|
265
|
+
alert?: LoginTwoFactorCodeAlert;
|
|
266
|
+
secondaryAction?: LoginScreenAction;
|
|
267
|
+
testId?: string;
|
|
268
|
+
onSubmit: (code: string) => void;
|
|
269
|
+
};
|
|
270
|
+
export type LoginTwoFactorSetupState = LoginTwoFactorSetupStartState | LoginTwoFactorSetupCodeState;
|
|
271
|
+
/** The recovery codes, shown once after enrolment. */
|
|
272
|
+
export type LoginTwoFactorRecoveryCodesState = {
|
|
273
|
+
kind: 'two-factor-recovery-codes';
|
|
274
|
+
/** That the codes will not be shown again. */
|
|
275
|
+
warning: string;
|
|
276
|
+
codes: string[];
|
|
277
|
+
copyLabel: string;
|
|
278
|
+
continueLabel: string;
|
|
279
|
+
busyLabel: string;
|
|
280
|
+
/** `onContinue` is in flight: Continue is locked, the codes can still be copied. */
|
|
281
|
+
busy?: boolean;
|
|
282
|
+
error?: string | null;
|
|
283
|
+
testId?: string;
|
|
284
|
+
onCopy: () => void;
|
|
285
|
+
onContinue: () => void;
|
|
286
|
+
};
|
|
185
287
|
export type LoginInvitationState = {
|
|
186
288
|
kind: 'invitation';
|
|
187
289
|
identity?: string | null;
|
|
@@ -232,18 +334,25 @@ export type LoginConsentState = {
|
|
|
232
334
|
};
|
|
233
335
|
export type LoginStatusState = {
|
|
234
336
|
kind: 'status';
|
|
235
|
-
/**
|
|
236
|
-
|
|
337
|
+
/**
|
|
338
|
+
* `info` is a neutral notice, such as "check your email"; it keeps the normal logo. `working` is a progress message,
|
|
339
|
+
* for a request the screen waits on.
|
|
340
|
+
*/
|
|
341
|
+
tone: 'success' | 'error' | 'disabled' | 'info' | 'working';
|
|
237
342
|
message: string;
|
|
238
343
|
detail?: string;
|
|
344
|
+
/** A failure beside the message, under any tone, such as a send that failed on an `info` notice. */
|
|
345
|
+
error?: string | null;
|
|
239
346
|
recoverable?: boolean;
|
|
240
347
|
retryLabel?: string;
|
|
241
348
|
testId?: string;
|
|
242
349
|
onRetry?: () => void;
|
|
243
|
-
primaryAction?: {
|
|
244
|
-
|
|
245
|
-
|
|
350
|
+
primaryAction?: LoginScreenAction & {
|
|
351
|
+
/** Its request is in flight: the action and `secondaryAction` are locked. Pass the in-flight wording as `label`. */
|
|
352
|
+
busy?: boolean;
|
|
246
353
|
};
|
|
354
|
+
/** The way back out, such as `Back to sign in`. It shows beside `primaryAction`, the retry, or alone. */
|
|
355
|
+
secondaryAction?: LoginScreenAction;
|
|
247
356
|
};
|
|
248
357
|
/**
|
|
249
358
|
* The tab that started a cross-device sign-in, waiting while the link is approved. The outcome messages use `status`,
|
|
@@ -288,7 +397,7 @@ export type LoginPasswordlessApprovalLoadingState = {
|
|
|
288
397
|
loading: true;
|
|
289
398
|
};
|
|
290
399
|
export type LoginPasswordlessApprovalState = LoginPasswordlessApprovalFormState | LoginPasswordlessApprovalLoadingState;
|
|
291
|
-
export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
|
|
400
|
+
export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginTwoFactorCodeState | LoginTwoFactorSetupState | LoginTwoFactorRecoveryCodesState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
|
|
292
401
|
export type LoginScreenProps = {
|
|
293
402
|
chrome: LoginScreenChrome;
|
|
294
403
|
state: LoginScreenState;
|