@passflow/react 0.18.0 → 0.19.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 +19 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +126 -118
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/passflow/index.d.cts +7 -1
- package/dist/src/components/flow/passflow/index.d.ts +7 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.cts +2 -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.cts +2 -1
- package/dist/src/components/form/signup/index.d.ts +2 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.cts +13 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.ts +13 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.ts.map +1 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.cts +6 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts +6 -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.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.cts +4 -14
- package/dist/src/components/provider/passflow-provider.d.ts +4 -14
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/email-code.d.cts +16 -1
- package/dist/src/components/ui/login-screen/email-code.d.ts +16 -1
- package/dist/src/components/ui/login-screen/email-code.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/passwordless-approval.d.cts +4 -0
- package/dist/src/components/ui/login-screen/passwordless-approval.d.ts +4 -0
- package/dist/src/components/ui/login-screen/passwordless-approval.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/passwordless-waiting.d.cts +4 -0
- package/dist/src/components/ui/login-screen/passwordless-waiting.d.ts +4 -0
- package/dist/src/components/ui/login-screen/passwordless-waiting.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/types.d.cts +46 -1
- package/dist/src/components/ui/login-screen/types.d.ts +46 -1
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/context/navigation-context.d.cts +3 -0
- package/dist/src/context/navigation-context.d.ts +3 -0
- package/dist/src/context/navigation-context.d.ts.map +1 -1
- package/dist/src/hooks/use-provider.d.cts +2 -1
- package/dist/src/hooks/use-provider.d.ts +2 -1
- package/dist/src/hooks/use-provider.d.ts.map +1 -1
- package/dist/src/types/auth-errors.d.cts +2 -0
- package/dist/src/types/auth-errors.d.ts +2 -0
- package/dist/src/types/auth-errors.d.ts.map +1 -1
- package/dist/src/types/index.d.cts +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +32 -1
- package/dist/src/utils/auth-error.d.ts +32 -1
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +2 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/url-params.d.cts +17 -0
- package/dist/src/utils/url-params.d.ts +17 -0
- package/dist/src/utils/url-params.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -3
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import type { SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
1
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
2
2
|
import { type FlowLocation, type FlowNavigate } from './flow-router.cjs';
|
|
3
3
|
export type { FlowLocation as PassflowFlowLocation, FlowNavigate as PassflowFlowNavigate } from './flow-router.cjs';
|
|
4
4
|
type PassflowBaseProps = {
|
|
5
5
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
/**
|
|
8
|
+
* Where a federated redirect comes back. `app` (the default) keeps today's redirect URL. `login-page`, for a hosted
|
|
9
|
+
* login page on a PKCE app, comes back to this page, which exchanges the code and forwards the tokens to
|
|
10
|
+
* `successAuthRedirect`, else the app's default redirect.
|
|
11
|
+
*/
|
|
12
|
+
federatedLanding?: FederatedLanding;
|
|
7
13
|
error?: string;
|
|
8
14
|
relyingPartyId?: string;
|
|
9
15
|
/**
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import type { SuccessAuthRedirect } from '../../../types/index.js';
|
|
1
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.js';
|
|
2
2
|
import { type FlowLocation, type FlowNavigate } from './flow-router.js';
|
|
3
3
|
export type { FlowLocation as PassflowFlowLocation, FlowNavigate as PassflowFlowNavigate } from './flow-router.js';
|
|
4
4
|
type PassflowBaseProps = {
|
|
5
5
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
/**
|
|
8
|
+
* Where a federated redirect comes back. `app` (the default) keeps today's redirect URL. `login-page`, for a hosted
|
|
9
|
+
* login page on a PKCE app, comes back to this page, which exchanges the code and forwards the tokens to
|
|
10
|
+
* `successAuthRedirect`, else the app's default redirect.
|
|
11
|
+
*/
|
|
12
|
+
federatedLanding?: FederatedLanding;
|
|
7
13
|
error?: string;
|
|
8
14
|
relyingPartyId?: string;
|
|
9
15
|
/**
|
|
@@ -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,mBAAmB,EAAE,MAAM,SAAS,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;AA+QJ,eAAO,MAAM,YAAY,8DAA6C,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
2
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
3
3
|
export type TSignIn = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
relyingPartyId?: string;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
federatedLanding?: FederatedLanding;
|
|
7
8
|
signUpPath?: string;
|
|
8
9
|
verifyOTPPath?: string;
|
|
9
10
|
verifyMagicLinkPath?: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { SuccessAuthRedirect } from '../../../types/index.js';
|
|
2
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.js';
|
|
3
3
|
export type TSignIn = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
relyingPartyId?: string;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
federatedLanding?: FederatedLanding;
|
|
7
8
|
signUpPath?: string;
|
|
8
9
|
verifyOTPPath?: string;
|
|
9
10
|
verifyMagicLinkPath?: string;
|
|
@@ -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,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
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,CA6OlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
2
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
3
3
|
export type TSignUp = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
relyingPartyId?: string;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
federatedLanding?: FederatedLanding;
|
|
7
8
|
signInPath?: string;
|
|
8
9
|
verifyOTPPath?: string;
|
|
9
10
|
verifyMagicLinkPath?: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { SuccessAuthRedirect } from '../../../types/index.js';
|
|
2
|
+
import type { FederatedLanding, SuccessAuthRedirect } from '../../../types/index.js';
|
|
3
3
|
export type TSignUp = {
|
|
4
4
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
5
5
|
relyingPartyId?: string;
|
|
6
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
7
|
+
federatedLanding?: FederatedLanding;
|
|
7
8
|
signInPath?: string;
|
|
8
9
|
verifyOTPPath?: string;
|
|
9
10
|
verifyMagicLinkPath?: string;
|
|
@@ -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,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
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,CA2NlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
type VerifyChallengeApprovalProps = {
|
|
3
|
+
challengeId: string | null;
|
|
4
|
+
otp: string | null;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The device that opened an emailed link on a row only another device can sign in with. Opening it writes nothing: the
|
|
8
|
+
* user reads the request, then approves with the code shown on the other device, or denies. Errors from these calls
|
|
9
|
+
* are plain and carry no code, but are not logged here anyway, because this screen holds the OTP and the match code.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VerifyChallengeApproval: FC<VerifyChallengeApprovalProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=verify-challenge-approval.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
type VerifyChallengeApprovalProps = {
|
|
3
|
+
challengeId: string | null;
|
|
4
|
+
otp: string | null;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The device that opened an emailed link on a row only another device can sign in with. Opening it writes nothing: the
|
|
8
|
+
* user reads the request, then approves with the code shown on the other device, or denies. Errors from these calls
|
|
9
|
+
* are plain and carry no code, but are not logged here anyway, because this screen holds the OTP and the match code.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VerifyChallengeApproval: FC<VerifyChallengeApprovalProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=verify-challenge-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-challenge-approval.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-approval.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAarD,KAAK,4BAA4B,GAAG;IAClC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA2GpE,CAAC"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
type VerifyChallengeMagicLinkProps = {
|
|
3
|
+
signInPath?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const VerifyChallengeMagicLink: FC<VerifyChallengeMagicLinkProps>;
|
|
6
|
+
export {};
|
|
2
7
|
//# sourceMappingURL=verify-challenge-magic-link.d.ts.map
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
type VerifyChallengeMagicLinkProps = {
|
|
3
|
+
signInPath?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const VerifyChallengeMagicLink: FC<VerifyChallengeMagicLinkProps>;
|
|
6
|
+
export {};
|
|
2
7
|
//# sourceMappingURL=verify-challenge-magic-link.d.ts.map
|
|
@@ -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":"
|
|
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;AAkM5B,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.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-challenge-otp.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAKnD,OAAO,oBAAoB,CAAC;AAI5B,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAgBF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,mBAAmB,CAgFtD,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { type PassflowConfig } from '@passflow/core';
|
|
|
2
2
|
import React, { type FC, type ReactNode } from 'react';
|
|
3
3
|
import { type UpgradeProviderProps } from './upgrade-provider.cjs';
|
|
4
4
|
import { type NavigateFunction, type RouterType } from '../../context/index.cjs';
|
|
5
|
+
import { readParentChallengeIdFromURL } from '../../utils/url-params.cjs';
|
|
6
|
+
export { readParentChallengeIdFromURL };
|
|
5
7
|
/**
|
|
6
8
|
* The assurance-upgrade options a consumer may set on `PassflowProvider`.
|
|
7
9
|
*
|
|
@@ -54,7 +56,8 @@ type PassflowProviderProps = PassflowConfig & {
|
|
|
54
56
|
*
|
|
55
57
|
* - /auth/login — password login
|
|
56
58
|
* - /auth/register — password sign-up
|
|
57
|
-
* - /auth/passwordless
|
|
59
|
+
* - /auth/passwordless/start|complete — OTP / magic-link; the status and
|
|
60
|
+
* approval calls take no parent
|
|
58
61
|
* - /auth/passkey/* — passkey registration/auth
|
|
59
62
|
* - /auth/2fa/* — second-factor verify
|
|
60
63
|
* - /auth/validate — emailed sign-up / sign-in code
|
|
@@ -64,18 +67,6 @@ type PassflowProviderProps = PassflowConfig & {
|
|
|
64
67
|
* OIDC two-step flows)
|
|
65
68
|
*/
|
|
66
69
|
export declare const AUTH_ENDPOINT_PATTERN: RegExp;
|
|
67
|
-
/**
|
|
68
|
-
* Read `parent_challenge_id` from the current URL's query string.
|
|
69
|
-
* Returns `undefined` when not present so callers can short-circuit
|
|
70
|
-
* the OIDC interceptor on non-OIDC mounts.
|
|
71
|
-
*
|
|
72
|
-
* Lowercases only the parameter KEYS (not values) so the
|
|
73
|
-
* KSUID-shaped value isn't corrupted on the way through. (URL params
|
|
74
|
-
* are case-sensitive per RFC 3986; some Passflow URLs use mixed
|
|
75
|
-
* case like `appId=...`. The lowercase-keys treatment mirrors what
|
|
76
|
-
* the bundled login-app was doing pre-SDK-migration.)
|
|
77
|
-
*/
|
|
78
|
-
export declare const readParentChallengeIdFromURL: () => string | undefined;
|
|
79
70
|
/**
|
|
80
71
|
* Has the OIDC interceptor already taken ownership of the post-login navigation?
|
|
81
72
|
*
|
|
@@ -157,5 +148,4 @@ export type OIDCExchangeContextValue = {
|
|
|
157
148
|
};
|
|
158
149
|
export declare const OIDCExchangeContext: React.Context<OIDCExchangeContextValue>;
|
|
159
150
|
export declare const PassflowProvider: FC<PassflowProviderProps>;
|
|
160
|
-
export {};
|
|
161
151
|
//# sourceMappingURL=passflow-provider.d.ts.map
|
|
@@ -2,6 +2,8 @@ import { type PassflowConfig } from '@passflow/core';
|
|
|
2
2
|
import React, { type FC, type ReactNode } from 'react';
|
|
3
3
|
import { type UpgradeProviderProps } from './upgrade-provider.js';
|
|
4
4
|
import { type NavigateFunction, type RouterType } from '../../context/index.js';
|
|
5
|
+
import { readParentChallengeIdFromURL } from '../../utils/url-params.js';
|
|
6
|
+
export { readParentChallengeIdFromURL };
|
|
5
7
|
/**
|
|
6
8
|
* The assurance-upgrade options a consumer may set on `PassflowProvider`.
|
|
7
9
|
*
|
|
@@ -54,7 +56,8 @@ type PassflowProviderProps = PassflowConfig & {
|
|
|
54
56
|
*
|
|
55
57
|
* - /auth/login — password login
|
|
56
58
|
* - /auth/register — password sign-up
|
|
57
|
-
* - /auth/passwordless
|
|
59
|
+
* - /auth/passwordless/start|complete — OTP / magic-link; the status and
|
|
60
|
+
* approval calls take no parent
|
|
58
61
|
* - /auth/passkey/* — passkey registration/auth
|
|
59
62
|
* - /auth/2fa/* — second-factor verify
|
|
60
63
|
* - /auth/validate — emailed sign-up / sign-in code
|
|
@@ -64,18 +67,6 @@ type PassflowProviderProps = PassflowConfig & {
|
|
|
64
67
|
* OIDC two-step flows)
|
|
65
68
|
*/
|
|
66
69
|
export declare const AUTH_ENDPOINT_PATTERN: RegExp;
|
|
67
|
-
/**
|
|
68
|
-
* Read `parent_challenge_id` from the current URL's query string.
|
|
69
|
-
* Returns `undefined` when not present so callers can short-circuit
|
|
70
|
-
* the OIDC interceptor on non-OIDC mounts.
|
|
71
|
-
*
|
|
72
|
-
* Lowercases only the parameter KEYS (not values) so the
|
|
73
|
-
* KSUID-shaped value isn't corrupted on the way through. (URL params
|
|
74
|
-
* are case-sensitive per RFC 3986; some Passflow URLs use mixed
|
|
75
|
-
* case like `appId=...`. The lowercase-keys treatment mirrors what
|
|
76
|
-
* the bundled login-app was doing pre-SDK-migration.)
|
|
77
|
-
*/
|
|
78
|
-
export declare const readParentChallengeIdFromURL: () => string | undefined;
|
|
79
70
|
/**
|
|
80
71
|
* Has the OIDC interceptor already taken ownership of the post-login navigation?
|
|
81
72
|
*
|
|
@@ -157,5 +148,4 @@ export type OIDCExchangeContextValue = {
|
|
|
157
148
|
};
|
|
158
149
|
export declare const OIDCExchangeContext: React.Context<OIDCExchangeContextValue>;
|
|
159
150
|
export declare const PassflowProvider: FC<PassflowProviderProps>;
|
|
160
|
-
export {};
|
|
161
151
|
//# sourceMappingURL=passflow-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passflow-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/provider/passflow-provider.tsx"],"names":[],"mappings":"AAAA,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,EA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AC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/credentials.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,SAAS,CAAC;AAqB7E,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/credentials.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,SAAS,CAAC;AAqB7E,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiYtD,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { LoginEmailCodeState } from './types.cjs';
|
|
2
|
+
import type { LoginEmailCodeResend, LoginEmailCodeState } from './types.cjs';
|
|
3
|
+
type EmailCodeResendButtonProps = LoginEmailCodeResend & {
|
|
4
|
+
/** Locked by the step itself, while a verify is in flight. */
|
|
5
|
+
locked: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Resend, with its own cooldown. The countdown is drawn in the label but hidden
|
|
9
|
+
* from assistive technology, so the name stays `Resend code` and is not re-read
|
|
10
|
+
* every second. While it counts down, the button is `aria-disabled`: it keeps
|
|
11
|
+
* focus after a press instead of dropping the keyboard user.
|
|
12
|
+
*
|
|
13
|
+
* The step remounts it (`key`) when `restartKey` changes, which restarts the
|
|
14
|
+
* cooldown for a code the server sent again.
|
|
15
|
+
*/
|
|
16
|
+
export declare const EmailCodeResendButton: FC<EmailCodeResendButtonProps>;
|
|
3
17
|
/**
|
|
4
18
|
* The emailed verification code step: the server's prompt names a row of code
|
|
5
19
|
* boxes; six digits submit by themselves. A failed verify or a resend clears the
|
|
@@ -7,4 +21,5 @@ import type { LoginEmailCodeState } from './types.cjs';
|
|
|
7
21
|
* locked, and focus returns to the code when it ends.
|
|
8
22
|
*/
|
|
9
23
|
export declare const LoginEmailCode: FC<LoginEmailCodeState>;
|
|
24
|
+
export {};
|
|
10
25
|
//# sourceMappingURL=email-code.d.ts.map
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { LoginEmailCodeState } from './types.js';
|
|
2
|
+
import type { LoginEmailCodeResend, LoginEmailCodeState } from './types.js';
|
|
3
|
+
type EmailCodeResendButtonProps = LoginEmailCodeResend & {
|
|
4
|
+
/** Locked by the step itself, while a verify is in flight. */
|
|
5
|
+
locked: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Resend, with its own cooldown. The countdown is drawn in the label but hidden
|
|
9
|
+
* from assistive technology, so the name stays `Resend code` and is not re-read
|
|
10
|
+
* every second. While it counts down, the button is `aria-disabled`: it keeps
|
|
11
|
+
* focus after a press instead of dropping the keyboard user.
|
|
12
|
+
*
|
|
13
|
+
* The step remounts it (`key`) when `restartKey` changes, which restarts the
|
|
14
|
+
* cooldown for a code the server sent again.
|
|
15
|
+
*/
|
|
16
|
+
export declare const EmailCodeResendButton: FC<EmailCodeResendButtonProps>;
|
|
3
17
|
/**
|
|
4
18
|
* The emailed verification code step: the server's prompt names a row of code
|
|
5
19
|
* boxes; six digits submit by themselves. A failed verify or a resend clears the
|
|
@@ -7,4 +21,5 @@ import type { LoginEmailCodeState } from './types.js';
|
|
|
7
21
|
* locked, and focus returns to the code when it ends.
|
|
8
22
|
*/
|
|
9
23
|
export declare const LoginEmailCode: FC<LoginEmailCodeState>;
|
|
24
|
+
export {};
|
|
10
25
|
//# sourceMappingURL=email-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-code.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/email-code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAM3C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"email-code.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/email-code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAM3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AASzE,KAAK,0BAA0B,GAAG,oBAAoB,GAAG;IACvD,8DAA8D;IAC9D,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA0ChE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAgGlD,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, 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, } 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, 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, } 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,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,IAAI,sBAAsB,EAC3C,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
|
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,GACjB,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;AAehC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuD5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordless-approval.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/passwordless-approval.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAK3C,OAAO,KAAK,EAAsC,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAgGlG,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAStE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordless-waiting.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/passwordless-waiting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAyBtE,CAAC"}
|
|
@@ -73,6 +73,8 @@ export type LoginCredentialsState = {
|
|
|
73
73
|
onPasskey?: () => void;
|
|
74
74
|
onProvider?: (provider: Providers) => void;
|
|
75
75
|
onReset?: () => void;
|
|
76
|
+
/** Shown beside the alert when `error.startAgain` is set: the request behind this form is gone. */
|
|
77
|
+
onStartAgain?: () => void;
|
|
76
78
|
};
|
|
77
79
|
export type LoginCodeEntryState = {
|
|
78
80
|
kind: 'code-entry';
|
|
@@ -243,7 +245,50 @@ export type LoginStatusState = {
|
|
|
243
245
|
onClick: () => void;
|
|
244
246
|
};
|
|
245
247
|
};
|
|
246
|
-
|
|
248
|
+
/**
|
|
249
|
+
* The tab that started a cross-device sign-in, waiting while the link is approved. The outcome messages use `status`,
|
|
250
|
+
* with a primary action labelled `Start again`.
|
|
251
|
+
*/
|
|
252
|
+
export type LoginPasswordlessWaitingState = {
|
|
253
|
+
kind: 'passwordless-waiting';
|
|
254
|
+
/** The 4-digit code the approving device asks for. Only this tab ever shows it. */
|
|
255
|
+
matchCode: string;
|
|
256
|
+
/** The answer to a failed resend. */
|
|
257
|
+
error?: string | null;
|
|
258
|
+
/** The label defaults to `Resend email`. */
|
|
259
|
+
resend?: LoginEmailCodeResend;
|
|
260
|
+
testId?: string;
|
|
261
|
+
codeTestId?: string;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* The device that opened the link, approving or denying the sign-in. It shows no identity, and the final messages use
|
|
265
|
+
* `status`.
|
|
266
|
+
*/
|
|
267
|
+
export type LoginPasswordlessApprovalFormState = {
|
|
268
|
+
kind: 'passwordless-approval';
|
|
269
|
+
loading?: false;
|
|
270
|
+
appName: string;
|
|
271
|
+
browser: string;
|
|
272
|
+
os: string;
|
|
273
|
+
/** Omitted from the screen when null. */
|
|
274
|
+
location: string | null;
|
|
275
|
+
/** Ready to display. */
|
|
276
|
+
requestedAt: string;
|
|
277
|
+
/** Why the last answer failed; clears the typed code. */
|
|
278
|
+
error?: string | null;
|
|
279
|
+
/** An answer is in flight: the code and both actions are locked. */
|
|
280
|
+
busy?: boolean;
|
|
281
|
+
testId?: string;
|
|
282
|
+
onApprove: (code: string) => void;
|
|
283
|
+
onDeny: () => void;
|
|
284
|
+
};
|
|
285
|
+
/** The sign-in request is still being read: only a progress message shows. */
|
|
286
|
+
export type LoginPasswordlessApprovalLoadingState = {
|
|
287
|
+
kind: 'passwordless-approval';
|
|
288
|
+
loading: true;
|
|
289
|
+
};
|
|
290
|
+
export type LoginPasswordlessApprovalState = LoginPasswordlessApprovalFormState | LoginPasswordlessApprovalLoadingState;
|
|
291
|
+
export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
|
|
247
292
|
export type LoginScreenProps = {
|
|
248
293
|
chrome: LoginScreenChrome;
|
|
249
294
|
state: LoginScreenState;
|
|
@@ -73,6 +73,8 @@ export type LoginCredentialsState = {
|
|
|
73
73
|
onPasskey?: () => void;
|
|
74
74
|
onProvider?: (provider: Providers) => void;
|
|
75
75
|
onReset?: () => void;
|
|
76
|
+
/** Shown beside the alert when `error.startAgain` is set: the request behind this form is gone. */
|
|
77
|
+
onStartAgain?: () => void;
|
|
76
78
|
};
|
|
77
79
|
export type LoginCodeEntryState = {
|
|
78
80
|
kind: 'code-entry';
|
|
@@ -243,7 +245,50 @@ export type LoginStatusState = {
|
|
|
243
245
|
onClick: () => void;
|
|
244
246
|
};
|
|
245
247
|
};
|
|
246
|
-
|
|
248
|
+
/**
|
|
249
|
+
* The tab that started a cross-device sign-in, waiting while the link is approved. The outcome messages use `status`,
|
|
250
|
+
* with a primary action labelled `Start again`.
|
|
251
|
+
*/
|
|
252
|
+
export type LoginPasswordlessWaitingState = {
|
|
253
|
+
kind: 'passwordless-waiting';
|
|
254
|
+
/** The 4-digit code the approving device asks for. Only this tab ever shows it. */
|
|
255
|
+
matchCode: string;
|
|
256
|
+
/** The answer to a failed resend. */
|
|
257
|
+
error?: string | null;
|
|
258
|
+
/** The label defaults to `Resend email`. */
|
|
259
|
+
resend?: LoginEmailCodeResend;
|
|
260
|
+
testId?: string;
|
|
261
|
+
codeTestId?: string;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* The device that opened the link, approving or denying the sign-in. It shows no identity, and the final messages use
|
|
265
|
+
* `status`.
|
|
266
|
+
*/
|
|
267
|
+
export type LoginPasswordlessApprovalFormState = {
|
|
268
|
+
kind: 'passwordless-approval';
|
|
269
|
+
loading?: false;
|
|
270
|
+
appName: string;
|
|
271
|
+
browser: string;
|
|
272
|
+
os: string;
|
|
273
|
+
/** Omitted from the screen when null. */
|
|
274
|
+
location: string | null;
|
|
275
|
+
/** Ready to display. */
|
|
276
|
+
requestedAt: string;
|
|
277
|
+
/** Why the last answer failed; clears the typed code. */
|
|
278
|
+
error?: string | null;
|
|
279
|
+
/** An answer is in flight: the code and both actions are locked. */
|
|
280
|
+
busy?: boolean;
|
|
281
|
+
testId?: string;
|
|
282
|
+
onApprove: (code: string) => void;
|
|
283
|
+
onDeny: () => void;
|
|
284
|
+
};
|
|
285
|
+
/** The sign-in request is still being read: only a progress message shows. */
|
|
286
|
+
export type LoginPasswordlessApprovalLoadingState = {
|
|
287
|
+
kind: 'passwordless-approval';
|
|
288
|
+
loading: true;
|
|
289
|
+
};
|
|
290
|
+
export type LoginPasswordlessApprovalState = LoginPasswordlessApprovalFormState | LoginPasswordlessApprovalLoadingState;
|
|
291
|
+
export type LoginScreenState = LoginCredentialsState | LoginCodeEntryState | LoginEmailCodeState | LoginPasswordlessWaitingState | LoginPasswordlessApprovalState | LoginNewPasswordState | LoginPasskeyProgressState | LoginDeviceApprovalState | LoginSecondFactorState | LoginInvitationState | LoginGeneralErrorState | LoginConsentState | LoginStatusState;
|
|
247
292
|
export type LoginScreenProps = {
|
|
248
293
|
chrome: LoginScreenChrome;
|
|
249
294
|
state: LoginScreenState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/login-screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,gBAAgB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IA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GACzB,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,iBAAiB,GACjB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC"}
|
|
@@ -5,6 +5,7 @@ export type NavigateOptions = {
|
|
|
5
5
|
};
|
|
6
6
|
export type RouterType = 'default' | 'react-router' | 'tanstack-router' | 'wouter';
|
|
7
7
|
export type NavigateFunction = (options: NavigateOptions) => void;
|
|
8
|
+
export type FederatedLandingOutcome = 'signed-in' | 'failed';
|
|
8
9
|
export type NavigationContextType = {
|
|
9
10
|
navigate: NavigateFunction;
|
|
10
11
|
setNavigate: (navigate: NavigateFunction | null) => void;
|
|
@@ -19,6 +20,8 @@ export type NavigationContextType = {
|
|
|
19
20
|
twoFactorVerifyPath?: string;
|
|
20
21
|
/** Registers the 2FA route of a mounted flow; `null` withdraws it. */
|
|
21
22
|
setTwoFactorVerifyPath?: (path: string | null) => void;
|
|
23
|
+
/** How a PKCE federated redirect that landed on this page ended. A second factor owed is not an outcome here. */
|
|
24
|
+
federatedLandingOutcome?: FederatedLandingOutcome;
|
|
22
25
|
};
|
|
23
26
|
export declare const defaultNavigate: NavigateFunction;
|
|
24
27
|
export declare const NavigationContext: import("react").Context<NavigationContextType>;
|
|
@@ -5,6 +5,7 @@ export type NavigateOptions = {
|
|
|
5
5
|
};
|
|
6
6
|
export type RouterType = 'default' | 'react-router' | 'tanstack-router' | 'wouter';
|
|
7
7
|
export type NavigateFunction = (options: NavigateOptions) => void;
|
|
8
|
+
export type FederatedLandingOutcome = 'signed-in' | 'failed';
|
|
8
9
|
export type NavigationContextType = {
|
|
9
10
|
navigate: NavigateFunction;
|
|
10
11
|
setNavigate: (navigate: NavigateFunction | null) => void;
|
|
@@ -19,6 +20,8 @@ export type NavigationContextType = {
|
|
|
19
20
|
twoFactorVerifyPath?: string;
|
|
20
21
|
/** Registers the 2FA route of a mounted flow; `null` withdraws it. */
|
|
21
22
|
setTwoFactorVerifyPath?: (path: string | null) => void;
|
|
23
|
+
/** How a PKCE federated redirect that landed on this page ended. A second factor owed is not an outcome here. */
|
|
24
|
+
federatedLandingOutcome?: FederatedLandingOutcome;
|
|
22
25
|
};
|
|
23
26
|
export declare const defaultNavigate: NavigateFunction;
|
|
24
27
|
export declare const NavigationContext: import("react").Context<NavigationContextType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-context.d.ts","sourceRoot":"","sources":["../../../src/context/navigation-context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,iBAAiB,GAAG,QAAQ,CAAC;AAEnF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;AAElE,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sEAAsE;IACtE,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation-context.d.ts","sourceRoot":"","sources":["../../../src/context/navigation-context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OA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