@passflow/react 0.25.3 → 0.26.1
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 +51 -0
- package/README.md +177 -18
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +146 -143
- package/dist/index.es.js.map +1 -1
- package/dist/src/app.d.cts +5 -0
- package/dist/src/app.d.ts +5 -0
- package/dist/src/app.d.ts.map +1 -0
- package/dist/src/components/flow/index.d.cts +2 -0
- package/dist/src/components/flow/index.d.ts +2 -0
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/flow-router.d.cts +1 -0
- package/dist/src/components/flow/passflow/flow-router.d.ts +1 -0
- package/dist/src/components/flow/passflow/flow-router.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.cts +1 -1
- package/dist/src/components/flow/passflow/index.d.ts +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup/index.d.cts +1 -2
- package/dist/src/components/flow/two-factor-setup/index.d.ts +1 -2
- package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.cts +1 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts +1 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.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 +2 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts +2 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +1 -1
- 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 +2 -0
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +2 -0
- 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 +2 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +2 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/login-button/index.d.cts +54 -0
- package/dist/src/components/login-button/index.d.ts +54 -0
- package/dist/src/components/login-button/index.d.ts.map +1 -0
- package/dist/src/components/provider/passflow-provider.d.cts +4 -2
- package/dist/src/components/provider/passflow-provider.d.ts +4 -2
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/provider/upgrade-provider.d.cts +14 -1
- package/dist/src/components/provider/upgrade-provider.d.ts +14 -1
- package/dist/src/components/provider/upgrade-provider.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-password.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-phone.d.ts.map +1 -1
- package/dist/src/components/ui/index.d.cts +1 -0
- package/dist/src/components/ui/index.d.ts +1 -0
- package/dist/src/components/ui/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-button/index.d.cts +2 -0
- package/dist/src/components/ui/login-button/index.d.ts +2 -0
- package/dist/src/components/ui/login-button/index.d.ts.map +1 -0
- package/dist/src/components/ui/login-button/login-button.d.cts +36 -0
- package/dist/src/components/ui/login-button/login-button.d.ts +36 -0
- package/dist/src/components/ui/login-button/login-button.d.ts.map +1 -0
- package/dist/src/components/ui/login-button/shadcn-theme.d.cts +23 -0
- package/dist/src/components/ui/login-button/shadcn-theme.d.ts +23 -0
- package/dist/src/components/ui/login-button/shadcn-theme.d.ts.map +1 -0
- package/dist/src/components/ui/login-button/use-shadcn-theme.d.cts +9 -0
- package/dist/src/components/ui/login-button/use-shadcn-theme.d.ts +9 -0
- package/dist/src/components/ui/login-button/use-shadcn-theme.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/shared.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/two-factor-code.d.cts +2 -1
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts +2 -1
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/types.d.cts +2 -1
- package/dist/src/components/ui/login-screen/types.d.ts +2 -1
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.cts +9 -3
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +9 -3
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/status.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/types.d.cts +6 -2
- package/dist/src/components/ui/upgrade-dialog/types.d.ts +6 -2
- package/dist/src/components/ui/upgrade-dialog/types.d.ts.map +1 -1
- package/dist/src/context/auth-context.d.cts +8 -2
- package/dist/src/context/auth-context.d.ts +8 -2
- package/dist/src/context/auth-context.d.ts.map +1 -1
- package/dist/src/context/upgrade-context.d.cts +1 -1
- package/dist/src/context/upgrade-context.d.ts +1 -1
- package/dist/src/context/upgrade-context.d.ts.map +1 -1
- package/dist/src/dev-account.d.cts +2 -0
- package/dist/src/dev-account.d.ts +2 -0
- package/dist/src/dev-account.d.ts.map +1 -0
- package/dist/src/dev-in-app-sign-in.d.cts +2 -0
- package/dist/src/dev-in-app-sign-in.d.ts +2 -0
- package/dist/src/dev-in-app-sign-in.d.ts.map +1 -0
- package/dist/src/dev-step-up.d.cts +2 -0
- package/dist/src/dev-step-up.d.ts +2 -0
- package/dist/src/dev-step-up.d.ts.map +1 -0
- package/dist/src/dev-two-factor-challenge.d.cts +2 -0
- package/dist/src/dev-two-factor-challenge.d.ts +2 -0
- package/dist/src/dev-two-factor-challenge.d.ts.map +1 -0
- package/dist/src/hooks/index.d.cts +3 -1
- package/dist/src/hooks/index.d.ts +3 -1
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-logout.d.cts +3 -1
- package/dist/src/hooks/use-logout.d.ts +3 -1
- package/dist/src/hooks/use-logout.d.ts.map +1 -1
- package/dist/src/hooks/use-signin.d.cts +19 -2
- package/dist/src/hooks/use-signin.d.ts +19 -2
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.cts +6 -1
- package/dist/src/hooks/use-signup.d.ts +6 -1
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-enrollment.d.cts +1 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts +1 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-setup.d.cts +4 -1
- package/dist/src/hooks/use-two-factor-setup.d.ts +4 -1
- package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -1
- package/dist/src/hooks/use-user.d.cts +10 -0
- package/dist/src/hooks/use-user.d.ts +10 -0
- package/dist/src/hooks/use-user.d.ts.map +1 -0
- package/dist/src/index.d.cts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +6 -0
- package/dist/src/utils/auth-error.d.ts +6 -0
- 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/is-sign-in-page.d.cts +5 -0
- package/dist/src/utils/is-sign-in-page.d.ts +5 -0
- package/dist/src/utils/is-sign-in-page.d.ts.map +1 -1
- package/dist/src/utils/upgrade-auth.d.cts +7 -4
- package/dist/src/utils/upgrade-auth.d.ts +7 -4
- package/dist/src/utils/upgrade-auth.d.ts.map +1 -1
- package/dist/src/utils/url-params.d.ts.map +1 -1
- package/dist/src/utils/validation-schemas/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -10,13 +10,14 @@ export { type UseLogoutProps, useLogout } from './use-logout.cjs';
|
|
|
10
10
|
export { useNavigation } from './use-navigation.cjs';
|
|
11
11
|
export { useOutsideClick } from './use-outsideclick.cjs';
|
|
12
12
|
export { usePassflow } from './use-passflow.cjs';
|
|
13
|
+
export { usePassflowStore } from './use-passflow-store.cjs';
|
|
13
14
|
export { type UsePasswordlessCompleteProps, usePasswordlessComplete } from './use-passwordless-complete.cjs';
|
|
14
15
|
export { type UseProviderProps, useProvider } from './use-provider.cjs';
|
|
15
16
|
export { type UseRefreshStatusResult, useRefreshStatus } from './use-refresh-status.cjs';
|
|
16
17
|
export { type UseResetPasswordProps, useResetPassword } from './use-reset-password.cjs';
|
|
17
18
|
export { type UseSessionExpiredOptions, type UseSessionExpiredResult, useSessionExpired, } from './use-session-expired.cjs';
|
|
18
19
|
export { useSignInEnding } from './use-sign-in-ending.cjs';
|
|
19
|
-
export { type UseSignInProps, useSignIn } from './use-signin.cjs';
|
|
20
|
+
export { type SignInOutcome, type UseSignInOptions, type UseSignInProps, useSignIn } from './use-signin.cjs';
|
|
20
21
|
export { type UseSignUpProps, useSignUp } from './use-signup.cjs';
|
|
21
22
|
export { type UseTrustedDevicesProps, useTrustedDevices } from './use-trusted-devices.cjs';
|
|
22
23
|
export { type UseTwoFactorChallengeReturn, useTwoFactorChallenge } from './use-two-factor-challenge.cjs';
|
|
@@ -27,5 +28,6 @@ export { type UseTwoFactorSetupMagicLinkReturn, useTwoFactorSetupMagicLink } fro
|
|
|
27
28
|
export { type UseTwoFactorStatusProps, useTwoFactorStatus } from './use-two-factor-status.cjs';
|
|
28
29
|
export { type UseTwoFactorVerifyProps, useTwoFactorVerify } from './use-two-factor-verify.cjs';
|
|
29
30
|
export { type UseUpgradeResult, useUpgrade } from './use-upgrade.cjs';
|
|
31
|
+
export { type PassflowUser, useUser } from './use-user.cjs';
|
|
30
32
|
export { type UseUserPasskeysProps, useUserPasskeys } from './use-user-passkeys.cjs';
|
|
31
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -10,13 +10,14 @@ export { type UseLogoutProps, useLogout } from './use-logout.js';
|
|
|
10
10
|
export { useNavigation } from './use-navigation.js';
|
|
11
11
|
export { useOutsideClick } from './use-outsideclick.js';
|
|
12
12
|
export { usePassflow } from './use-passflow.js';
|
|
13
|
+
export { usePassflowStore } from './use-passflow-store.js';
|
|
13
14
|
export { type UsePasswordlessCompleteProps, usePasswordlessComplete } from './use-passwordless-complete.js';
|
|
14
15
|
export { type UseProviderProps, useProvider } from './use-provider.js';
|
|
15
16
|
export { type UseRefreshStatusResult, useRefreshStatus } from './use-refresh-status.js';
|
|
16
17
|
export { type UseResetPasswordProps, useResetPassword } from './use-reset-password.js';
|
|
17
18
|
export { type UseSessionExpiredOptions, type UseSessionExpiredResult, useSessionExpired, } from './use-session-expired.js';
|
|
18
19
|
export { useSignInEnding } from './use-sign-in-ending.js';
|
|
19
|
-
export { type UseSignInProps, useSignIn } from './use-signin.js';
|
|
20
|
+
export { type SignInOutcome, type UseSignInOptions, type UseSignInProps, useSignIn } from './use-signin.js';
|
|
20
21
|
export { type UseSignUpProps, useSignUp } from './use-signup.js';
|
|
21
22
|
export { type UseTrustedDevicesProps, useTrustedDevices } from './use-trusted-devices.js';
|
|
22
23
|
export { type UseTwoFactorChallengeReturn, useTwoFactorChallenge } from './use-two-factor-challenge.js';
|
|
@@ -27,5 +28,6 @@ export { type UseTwoFactorSetupMagicLinkReturn, useTwoFactorSetupMagicLink } fro
|
|
|
27
28
|
export { type UseTwoFactorStatusProps, useTwoFactorStatus } from './use-two-factor-status.js';
|
|
28
29
|
export { type UseTwoFactorVerifyProps, useTwoFactorVerify } from './use-two-factor-verify.js';
|
|
29
30
|
export { type UseUpgradeResult, useUpgrade } from './use-upgrade.js';
|
|
31
|
+
export { type PassflowUser, useUser } from './use-user.js';
|
|
30
32
|
export { type UseUserPasskeysProps, useUserPasskeys } from './use-user-passkeys.js';
|
|
31
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,6BA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H,OAAO,EAAE,KAAK,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAEtH,OAAO,EAAE,KAAK,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,KAAK,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE3F,OAAO,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,KAAK,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { LogOutOptions } from '@passflow/core';
|
|
1
2
|
export type UseLogoutProps = () => {
|
|
2
|
-
fetch
|
|
3
|
+
/** After a hosted sign-in core leaves the page once signed out, so code after `await fetch()` may not run. */
|
|
4
|
+
fetch: (options?: LogOutOptions) => Promise<boolean>;
|
|
3
5
|
isLoading: boolean;
|
|
4
6
|
isError: boolean;
|
|
5
7
|
error: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { LogOutOptions } from '@passflow/core';
|
|
1
2
|
export type UseLogoutProps = () => {
|
|
2
|
-
fetch
|
|
3
|
+
/** After a hosted sign-in core leaves the page once signed out, so code after `await fetch()` may not run. */
|
|
4
|
+
fetch: (options?: LogOutOptions) => Promise<boolean>;
|
|
3
5
|
isLoading: boolean;
|
|
4
6
|
isError: boolean;
|
|
5
7
|
error: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-logout.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-logout.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-logout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,MAAM,MAAM,cAAc,GAAG,MAAM;IACjC,8GAA8G;IAC9G,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cAwBvB,CAAC"}
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import type { PassflowPasskeyAuthenticateStartPayload, PassflowPasswordlessResponse, PassflowPasswordlessSignInPayload, PassflowSignInPayload } from '@passflow/core';
|
|
2
2
|
import type { AuthOperation, AuthUiError } from '../types/index.cjs';
|
|
3
3
|
import { type UseEmailCodeStep } from './use-email-code-step.cjs';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* How a password or passkey sign-in ended. `'two-factor-required'` means core holds a pending sign-in that still owes
|
|
6
|
+
* a second factor: there is no session yet.
|
|
7
|
+
*/
|
|
8
|
+
export type SignInOutcome = 'signed-in' | 'two-factor-required';
|
|
9
|
+
export type UseSignInOptions = {
|
|
10
|
+
/**
|
|
11
|
+
* Called when the server refuses the sign-in until the password is changed. `fetch` then resolves `false` and sets
|
|
12
|
+
* no form error; send the user to the password reset. `notice` is the server's message for the user. Without this
|
|
13
|
+
* option, the same message shows as the form error.
|
|
14
|
+
*/
|
|
15
|
+
onPasswordChangeRequired?: (notice: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export type UseSignInProps = (options?: UseSignInOptions) => {
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a {@link SignInOutcome} for a password or passkey sign-in, the server's answer for a passwordless one,
|
|
20
|
+
* and `false` when the request failed, was superseded, or entered the emailed-code step.
|
|
21
|
+
*/
|
|
22
|
+
fetch: (payload: PassflowPasskeyAuthenticateStartPayload | PassflowSignInPayload | PassflowPasswordlessSignInPayload, type: AuthOperation) => Promise<false | SignInOutcome | PassflowPasswordlessResponse>;
|
|
6
23
|
isLoading: boolean;
|
|
7
24
|
isError: boolean;
|
|
8
25
|
error: AuthUiError | null;
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import type { PassflowPasskeyAuthenticateStartPayload, PassflowPasswordlessResponse, PassflowPasswordlessSignInPayload, PassflowSignInPayload } from '@passflow/core';
|
|
2
2
|
import type { AuthOperation, AuthUiError } from '../types/index.js';
|
|
3
3
|
import { type UseEmailCodeStep } from './use-email-code-step.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* How a password or passkey sign-in ended. `'two-factor-required'` means core holds a pending sign-in that still owes
|
|
6
|
+
* a second factor: there is no session yet.
|
|
7
|
+
*/
|
|
8
|
+
export type SignInOutcome = 'signed-in' | 'two-factor-required';
|
|
9
|
+
export type UseSignInOptions = {
|
|
10
|
+
/**
|
|
11
|
+
* Called when the server refuses the sign-in until the password is changed. `fetch` then resolves `false` and sets
|
|
12
|
+
* no form error; send the user to the password reset. `notice` is the server's message for the user. Without this
|
|
13
|
+
* option, the same message shows as the form error.
|
|
14
|
+
*/
|
|
15
|
+
onPasswordChangeRequired?: (notice: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export type UseSignInProps = (options?: UseSignInOptions) => {
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a {@link SignInOutcome} for a password or passkey sign-in, the server's answer for a passwordless one,
|
|
20
|
+
* and `false` when the request failed, was superseded, or entered the emailed-code step.
|
|
21
|
+
*/
|
|
22
|
+
fetch: (payload: PassflowPasskeyAuthenticateStartPayload | PassflowSignInPayload | PassflowPasswordlessSignInPayload, type: AuthOperation) => Promise<false | SignInOutcome | PassflowPasswordlessResponse>;
|
|
6
23
|
isLoading: boolean;
|
|
7
24
|
isError: boolean;
|
|
8
25
|
error: AuthUiError | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-signin.d.ts","sourceRoot":"","sources":["../../../src/hooks/use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AAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cAsGvB,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { PassflowPasskeyRegisterStartPayload, PassflowPasswordlessResponse, PassflowPasswordlessSignInPayload, PassflowSignUpPayload } from '@passflow/core';
|
|
2
2
|
import type { AuthOperation, AuthUiError } from '../types/index.cjs';
|
|
3
3
|
import { type UseEmailCodeStep } from './use-email-code-step.cjs';
|
|
4
|
+
import type { SignInOutcome } from './use-signin.cjs';
|
|
4
5
|
export type UseSignUpProps = () => {
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Resolves a {@link SignInOutcome} for a password or passkey sign-up, the server's answer for a passwordless one,
|
|
8
|
+
* and `false` when the request failed or entered the emailed-code step.
|
|
9
|
+
*/
|
|
10
|
+
fetch: (payload: PassflowPasskeyRegisterStartPayload | PassflowSignUpPayload | PassflowPasswordlessSignInPayload, type: AuthOperation) => Promise<false | SignInOutcome | PassflowPasswordlessResponse>;
|
|
6
11
|
isLoading: boolean;
|
|
7
12
|
isError: boolean;
|
|
8
13
|
error: AuthUiError | null;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { PassflowPasskeyRegisterStartPayload, PassflowPasswordlessResponse, PassflowPasswordlessSignInPayload, PassflowSignUpPayload } from '@passflow/core';
|
|
2
2
|
import type { AuthOperation, AuthUiError } from '../types/index.js';
|
|
3
3
|
import { type UseEmailCodeStep } from './use-email-code-step.js';
|
|
4
|
+
import type { SignInOutcome } from './use-signin.js';
|
|
4
5
|
export type UseSignUpProps = () => {
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Resolves a {@link SignInOutcome} for a password or passkey sign-up, the server's answer for a passwordless one,
|
|
8
|
+
* and `false` when the request failed or entered the emailed-code step.
|
|
9
|
+
*/
|
|
10
|
+
fetch: (payload: PassflowPasskeyRegisterStartPayload | PassflowSignUpPayload | PassflowPasswordlessSignInPayload, type: AuthOperation) => Promise<false | SignInOutcome | PassflowPasswordlessResponse>;
|
|
6
11
|
isLoading: boolean;
|
|
7
12
|
isError: boolean;
|
|
8
13
|
error: AuthUiError | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-signup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-signup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,EACjC,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-signup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-signup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,EACjC,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,MAAM;IACjC;;;OAGG;IACH,KAAK,EAAE,CACL,OAAO,EAAE,mCAAmC,GAAG,qBAAqB,GAAG,iCAAiC,EACxG,IAAI,EAAE,aAAa,KAChB,OAAO,CAAC,KAAK,GAAG,aAAa,GAAG,4BAA4B,CAAC,CAAC;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;OAGG;IACH,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cA8EvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-two-factor-enrollment.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-enrollment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"use-two-factor-enrollment.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-enrollment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAiB1F,kHAAkH;AAClH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,MAAM,yBAAyB,GACjC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,GACpF;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACnF;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAEzB,MAAM,MAAM,2BAA2B,GAAG;IACxC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,yBAAyB,CAAC;IAClC,yFAAyF;IACzF,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,mFAAmF;IACnF,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,qDAAqD;IACrD,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,KAAK,IAAI,CAAC;IAChD,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAqBF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,oBAAoB,2BAA2B,KAAQ,4BAkJzF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TwoFactorConfirmResponse, TwoFactorSetupResponse } from '@passflow/core';
|
|
2
|
-
|
|
2
|
+
/** `checking` reads whether a signed-in user is enrolled; `enrolled` is a user with two-factor authentication on. */
|
|
3
|
+
export type TwoFactorSetupStep = 'checking' | 'idle' | 'setup' | 'complete' | 'enrolled';
|
|
3
4
|
export type UseTwoFactorSetupProps = () => {
|
|
4
5
|
setupData: TwoFactorSetupResponse | null;
|
|
5
6
|
recoveryCodes: string[];
|
|
@@ -7,6 +8,8 @@ export type UseTwoFactorSetupProps = () => {
|
|
|
7
8
|
beginSetup: () => Promise<TwoFactorSetupResponse | null>;
|
|
8
9
|
confirmSetup: (code: string) => Promise<TwoFactorConfirmResponse | null>;
|
|
9
10
|
reset: () => void;
|
|
11
|
+
/** The user saved the codes, or there were none: the step becomes `enrolled`. */
|
|
12
|
+
finish: () => void;
|
|
10
13
|
isLoading: boolean;
|
|
11
14
|
isError: boolean;
|
|
12
15
|
error: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TwoFactorConfirmResponse, TwoFactorSetupResponse } from '@passflow/core';
|
|
2
|
-
|
|
2
|
+
/** `checking` reads whether a signed-in user is enrolled; `enrolled` is a user with two-factor authentication on. */
|
|
3
|
+
export type TwoFactorSetupStep = 'checking' | 'idle' | 'setup' | 'complete' | 'enrolled';
|
|
3
4
|
export type UseTwoFactorSetupProps = () => {
|
|
4
5
|
setupData: TwoFactorSetupResponse | null;
|
|
5
6
|
recoveryCodes: string[];
|
|
@@ -7,6 +8,8 @@ export type UseTwoFactorSetupProps = () => {
|
|
|
7
8
|
beginSetup: () => Promise<TwoFactorSetupResponse | null>;
|
|
8
9
|
confirmSetup: (code: string) => Promise<TwoFactorConfirmResponse | null>;
|
|
9
10
|
reset: () => void;
|
|
11
|
+
/** The user saved the codes, or there were none: the step becomes `enrolled`. */
|
|
12
|
+
finish: () => void;
|
|
10
13
|
isLoading: boolean;
|
|
11
14
|
isError: boolean;
|
|
12
15
|
error: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-two-factor-setup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAKvF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"use-two-factor-setup.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-two-factor-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAKvF,qHAAqH;AACrH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzF,MAAM,MAAM,sBAAsB,GAAG,MAAM;IACzC,SAAS,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IACzD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;IACzE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,iFAAiF;IACjF,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAUF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,sBAwF/B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The signed-in user, from the tokens. Every field is absent when no one is signed in. */
|
|
2
|
+
export type PassflowUser = {
|
|
3
|
+
/** The user id, the tokens' `sub`. */
|
|
4
|
+
id?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
};
|
|
8
|
+
/** The signed-in user's id, email and phone. Re-renders on sign-in, sign-up, refresh, sign-out and session expiry. */
|
|
9
|
+
export declare const useUser: () => PassflowUser;
|
|
10
|
+
//# sourceMappingURL=use-user.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The signed-in user, from the tokens. Every field is absent when no one is signed in. */
|
|
2
|
+
export type PassflowUser = {
|
|
3
|
+
/** The user id, the tokens' `sub`. */
|
|
4
|
+
id?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
};
|
|
8
|
+
/** The signed-in user's id, email and phone. Re-renders on sign-in, sign-up, refresh, sign-out and session expiry. */
|
|
9
|
+
export declare const useUser: () => PassflowUser;
|
|
10
|
+
//# sourceMappingURL=use-user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-user.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-user.ts"],"names":[],"mappings":"AAIA,2FAA2F;AAC3F,MAAM,MAAM,YAAY,GAAG;IACzB,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6BF,sHAAsH;AACtH,eAAO,MAAM,OAAO,QAAO,YAiB1B,CAAC"}
|
package/dist/src/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '@passflow/core';
|
|
2
2
|
export * from './components/flow/index.cjs';
|
|
3
3
|
export * from './components/form/index.cjs';
|
|
4
|
+
export { LoginButton, type LoginButtonProps, type LoginButtonRenderProps } from './components/login-button/index.cjs';
|
|
4
5
|
export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.cjs';
|
|
5
6
|
export { PassflowProvider, UpgradeProvider } from './components/provider/index.cjs';
|
|
6
7
|
export * from './components/ui/index.cjs';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '@passflow/core';
|
|
2
2
|
export * from './components/flow/index.js';
|
|
3
3
|
export * from './components/form/index.js';
|
|
4
|
+
export { LoginButton, type LoginButtonProps, type LoginButtonRenderProps } from './components/login-button/index.js';
|
|
4
5
|
export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.js';
|
|
5
6
|
export { PassflowProvider, UpgradeProvider } from './components/provider/index.js';
|
|
6
7
|
export * from './components/ui/index.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC5G,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -3,6 +3,12 @@ export declare const authRedirectErrorMessage = "We couldn't continue this authe
|
|
|
3
3
|
export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
|
|
4
4
|
export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
|
|
5
5
|
export declare const verificationRequestErrorMessage = "This verification request is no longer available. Start again to request a new link or code.";
|
|
6
|
+
/** The server refuses a sign-in until the password is changed; only the emailed reset flow can continue. */
|
|
7
|
+
export declare const passwordChangeRequiredErrorId = "error.api.password.change.required";
|
|
8
|
+
/** The `reason` value that sends a user whose password must change to forgot-password. */
|
|
9
|
+
export declare const passwordChangeRequiredReason = "password_change_required";
|
|
10
|
+
/** Shown on forgot-password for that reason. Fixed SDK copy: text from the URL is never displayed. */
|
|
11
|
+
export declare const passwordChangeRequiredMessage = "You must change your password before you can sign in. Reset your password to continue.";
|
|
6
12
|
export declare const authErrorFor: (flow: AuthFlow, operation: AuthOperation) => AuthUiError;
|
|
7
13
|
/**
|
|
8
14
|
* Server error ids whose `message` is written for the end user (localized, no operator detail) and may be shown as
|
|
@@ -3,6 +3,12 @@ export declare const authRedirectErrorMessage = "We couldn't continue this authe
|
|
|
3
3
|
export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
|
|
4
4
|
export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
|
|
5
5
|
export declare const verificationRequestErrorMessage = "This verification request is no longer available. Start again to request a new link or code.";
|
|
6
|
+
/** The server refuses a sign-in until the password is changed; only the emailed reset flow can continue. */
|
|
7
|
+
export declare const passwordChangeRequiredErrorId = "error.api.password.change.required";
|
|
8
|
+
/** The `reason` value that sends a user whose password must change to forgot-password. */
|
|
9
|
+
export declare const passwordChangeRequiredReason = "password_change_required";
|
|
10
|
+
/** Shown on forgot-password for that reason. Fixed SDK copy: text from the URL is never displayed. */
|
|
11
|
+
export declare const passwordChangeRequiredMessage = "You must change your password before you can sign in. Reset your password to continue.";
|
|
6
12
|
export declare const authErrorFor: (flow: AuthFlow, operation: AuthOperation) => AuthUiError;
|
|
7
13
|
/**
|
|
8
14
|
* Server error ids whose `message` is written for the end user (localized, no operator detail) and may be shown as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BAA+B,iGACoD,CAAC;AAEjG,eAAO,MAAM,YAAY,SAAU,QAAQ,aAAa,aAAa,KAAG,WAA+C,CAAC;AAExH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAA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AM,0BAA0B,gHACwE,CAAC;AAChH,eAAO,MAAM,0BAA0B,sFAAsF,CAAC;AAC9H,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAC3E,eAAO,MAAM,+BAA+B,yCAAyC,CAAC;AACtF,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,cAAc,GACd,YAAY,GACZ,kBAAkB,GAClB,aAAa,GACb,aAAa,GACb,aAAa,GACb,OAAO,CAAC;AAEZ,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,UAAW,OAAO,KAAG,OAAkD,CAAC;AAEtG,uHAAuH;AACvH,eAAO,MAAM,qBAAqB,UAAW,OAAO,KAAG,OAC2C,CAAC;AAiBnG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UAAW,OAAO,KAAG,iBAetD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
|
|
1
|
+
export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordChangeRequiredErrorId, passwordChangeRequiredMessage, passwordChangeRequiredReason, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverErrorIdFrom, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
|
|
2
2
|
export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.cjs';
|
|
3
3
|
export { classifyTwoFactorError, getUserFriendlyErrorMessage, isTerminalTwoFactorError } from './classify-two-factor-error.cjs';
|
|
4
4
|
export { cn } from './cn.cjs';
|
|
@@ -10,7 +10,7 @@ export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from
|
|
|
10
10
|
export { getUrlErrors } from './get-url-errors.cjs';
|
|
11
11
|
export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.cjs';
|
|
12
12
|
export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.cjs';
|
|
13
|
-
export { isSameOriginPath, isSignInPage } from './is-sign-in-page.cjs';
|
|
13
|
+
export { inAppPath, isSameOriginPath, isSignInPage } from './is-sign-in-page.cjs';
|
|
14
14
|
export { routeToSecondFactor, signInSearch, urlCarriesTwoFactorToken } from './second-factor.cjs';
|
|
15
15
|
export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.cjs';
|
|
16
16
|
export { undefinedOnCatch } from './undefined-on-catch.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.js';
|
|
1
|
+
export { type ApprovalError, approvalAlreadyDecidedMessage, approvalApprovedMessage, approvalAttemptsMessage, approvalConnectionMessage, approvalDeniedMessage, approvalErrorFrom, approvalInvalidMessage, approvalUnavailableMessage, approvalUnknownErrorMessage, authErrorFor, authErrorFrom, authRedirectErrorFrom, authRedirectErrorMessage, emailCodeErrorMessage, invitationJoinErrorFrom, invitationLinkErrorMessage, isApprovalMatchError, isPasswordSavedRateLimit, newPasswordErrorMessage, passwordChangeRequiredErrorId, passwordChangeRequiredMessage, passwordChangeRequiredReason, passwordlessCompleteErrorMessage, passwordlessLinkExpiredMessage, passwordlessSignInFailedMessage, passwordlessWaitCompletedMessage, passwordlessWaitDeniedMessage, serverErrorIdFrom, serverMessageFor, twoFactorBackToSignInLabel, twoFactorLinkAlreadyUsedMessage, twoFactorRateLimitedMessage, twoFactorSignInLabel, twoFactorWrongRecoveryCodeMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.js';
|
|
2
2
|
export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.js';
|
|
3
3
|
export { classifyTwoFactorError, getUserFriendlyErrorMessage, isTerminalTwoFactorError } from './classify-two-factor-error.js';
|
|
4
4
|
export { cn } from './cn.js';
|
|
@@ -10,7 +10,7 @@ export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from
|
|
|
10
10
|
export { getUrlErrors } from './get-url-errors.js';
|
|
11
11
|
export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.js';
|
|
12
12
|
export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.js';
|
|
13
|
-
export { isSameOriginPath, isSignInPage } from './is-sign-in-page.js';
|
|
13
|
+
export { inAppPath, isSameOriginPath, isSignInPage } from './is-sign-in-page.js';
|
|
14
14
|
export { routeToSecondFactor, signInSearch, urlCarriesTwoFactorToken } from './second-factor.js';
|
|
15
15
|
export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.js';
|
|
16
16
|
export { undefinedOnCatch } from './undefined-on-catch.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,gBAAgB,EAChB,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EACpB,iCAAiC,EACjC,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,cAAc,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AC;AACxD,OAAO,EACL,UAAU,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** Whether a target is a path on this page's origin, as opposed to a full address or anything that could leave it. */
|
|
2
2
|
export declare const isSameOriginPath: (target: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The path, query and fragment a target names on this page's origin, or `null` when it leads elsewhere. A full
|
|
5
|
+
* address on this origin counts: it is the same app, so getting there needs no new page load.
|
|
6
|
+
*/
|
|
7
|
+
export declare const inAppPath: (target: string) => string | null;
|
|
3
8
|
/** Whether a sign-in's target is the sign-in page of this app, whatever its query or fragment. */
|
|
4
9
|
export declare const isSignInPage: (target: string, signInPath?: string) => boolean;
|
|
5
10
|
//# sourceMappingURL=is-sign-in-page.d.ts.map
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** Whether a target is a path on this page's origin, as opposed to a full address or anything that could leave it. */
|
|
2
2
|
export declare const isSameOriginPath: (target: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The path, query and fragment a target names on this page's origin, or `null` when it leads elsewhere. A full
|
|
5
|
+
* address on this origin counts: it is the same app, so getting there needs no new page load.
|
|
6
|
+
*/
|
|
7
|
+
export declare const inAppPath: (target: string) => string | null;
|
|
3
8
|
/** Whether a sign-in's target is the sign-in page of this app, whatever its query or fragment. */
|
|
4
9
|
export declare const isSignInPage: (target: string, signInPath?: string) => boolean;
|
|
5
10
|
//# sourceMappingURL=is-sign-in-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-sign-in-page.d.ts","sourceRoot":"","sources":["../../../src/utils/is-sign-in-page.ts"],"names":[],"mappings":"AAKA,sHAAsH;AACtH,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,OAOjD,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,YAAY,WAAY,MAAM,eAAc,MAAM,KAAwB,OAOtF,CAAC"}
|
|
1
|
+
{"version":3,"file":"is-sign-in-page.d.ts","sourceRoot":"","sources":["../../../src/utils/is-sign-in-page.ts"],"names":[],"mappings":"AAKA,sHAAsH;AACtH,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,OAOjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,MAAM,GAAG,IAKnD,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,YAAY,WAAY,MAAM,eAAc,MAAM,KAAwB,OAOtF,CAAC"}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* the release lands one microtask later. Nothing observes that gap but a caller
|
|
43
43
|
* reaching for an instance that has just been torn down.
|
|
44
44
|
*/
|
|
45
|
-
import type { FetchLike, Passflow, ResponseInterceptorHost } from '@passflow/core';
|
|
45
|
+
import type { FetchLike, Passflow, ResponseInterceptorHost, WithAuthOptions } from '@passflow/core';
|
|
46
46
|
/**
|
|
47
47
|
* Publishes the provider's `Passflow` instance to the free functions, and
|
|
48
48
|
* returns an unregister suitable as a React effect cleanup.
|
|
@@ -67,8 +67,11 @@ export declare const upgradeAuthInstance: () => Passflow | null;
|
|
|
67
67
|
* Wraps a `fetch` and returns the wrapper. Installs nothing and touches no
|
|
68
68
|
* global — two verbs exist because the semantics genuinely differ: an axios
|
|
69
69
|
* interceptor mutates, a fetch wrapper returns.
|
|
70
|
+
*
|
|
71
|
+
* A token goes only to the page's own origin and the ones in `options.origins`;
|
|
72
|
+
* a request to any other origin is sent without it.
|
|
70
73
|
*/
|
|
71
|
-
export declare const withAuth: (next?: FetchLike) => FetchLike;
|
|
74
|
+
export declare const withAuth: (next?: FetchLike, options?: WithAuthOptions) => FetchLike;
|
|
72
75
|
/**
|
|
73
76
|
* Attaches step-up handling to an axios instance the caller already owns,
|
|
74
77
|
* **mutating** it, and returns the `detach()` disposer — which is exactly what
|
|
@@ -76,7 +79,7 @@ export declare const withAuth: (next?: FetchLike) => FetchLike;
|
|
|
76
79
|
*
|
|
77
80
|
* The parameter is typed structurally (duck-typed on
|
|
78
81
|
* `interceptors.response.use`), so this package's axios version is not a
|
|
79
|
-
* constraint on the caller's.
|
|
82
|
+
* constraint on the caller's. `options.origins` works as it does for `withAuth`.
|
|
80
83
|
*/
|
|
81
|
-
export declare const attachAuth: (instance: ResponseInterceptorHost) => (() => void);
|
|
84
|
+
export declare const attachAuth: (instance: ResponseInterceptorHost, options?: WithAuthOptions) => (() => void);
|
|
82
85
|
//# sourceMappingURL=upgrade-auth.d.ts.map
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* the release lands one microtask later. Nothing observes that gap but a caller
|
|
43
43
|
* reaching for an instance that has just been torn down.
|
|
44
44
|
*/
|
|
45
|
-
import type { FetchLike, Passflow, ResponseInterceptorHost } from '@passflow/core';
|
|
45
|
+
import type { FetchLike, Passflow, ResponseInterceptorHost, WithAuthOptions } from '@passflow/core';
|
|
46
46
|
/**
|
|
47
47
|
* Publishes the provider's `Passflow` instance to the free functions, and
|
|
48
48
|
* returns an unregister suitable as a React effect cleanup.
|
|
@@ -67,8 +67,11 @@ export declare const upgradeAuthInstance: () => Passflow | null;
|
|
|
67
67
|
* Wraps a `fetch` and returns the wrapper. Installs nothing and touches no
|
|
68
68
|
* global — two verbs exist because the semantics genuinely differ: an axios
|
|
69
69
|
* interceptor mutates, a fetch wrapper returns.
|
|
70
|
+
*
|
|
71
|
+
* A token goes only to the page's own origin and the ones in `options.origins`;
|
|
72
|
+
* a request to any other origin is sent without it.
|
|
70
73
|
*/
|
|
71
|
-
export declare const withAuth: (next?: FetchLike) => FetchLike;
|
|
74
|
+
export declare const withAuth: (next?: FetchLike, options?: WithAuthOptions) => FetchLike;
|
|
72
75
|
/**
|
|
73
76
|
* Attaches step-up handling to an axios instance the caller already owns,
|
|
74
77
|
* **mutating** it, and returns the `detach()` disposer — which is exactly what
|
|
@@ -76,7 +79,7 @@ export declare const withAuth: (next?: FetchLike) => FetchLike;
|
|
|
76
79
|
*
|
|
77
80
|
* The parameter is typed structurally (duck-typed on
|
|
78
81
|
* `interceptors.response.use`), so this package's axios version is not a
|
|
79
|
-
* constraint on the caller's.
|
|
82
|
+
* constraint on the caller's. `options.origins` works as it does for `withAuth`.
|
|
80
83
|
*/
|
|
81
|
-
export declare const attachAuth: (instance: ResponseInterceptorHost) => (() => void);
|
|
84
|
+
export declare const attachAuth: (instance: ResponseInterceptorHost, options?: WithAuthOptions) => (() => void);
|
|
82
85
|
//# sourceMappingURL=upgrade-auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-auth.d.ts","sourceRoot":"","sources":["../../../src/utils/upgrade-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"upgrade-auth.d.ts","sourceRoot":"","sources":["../../../src/utils/upgrade-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAWpG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,aAAc,QAAQ,KAAG,CAAC,MAAM,IAAI,CAY3E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,aAAc,QAAQ,KAAG,IAE/D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,QAAO,QAAQ,GAAG,IAAsB,CAAC;AAWzE;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,UAAW,SAAS,YAAY,eAAe,KAAG,SAClB,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,aAAc,uBAAuB,YAAY,eAAe,KAAG,CAAC,MAAM,IAAI,CACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../src/utils/url-params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../src/utils/url-params.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,QAAO,MAAM,GAAG,SAQxD,CAAC;AAKF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAS,MAAM,KAAG,MAYvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,kBAAkB,CAAC;;eAqC5D,MAAM;kBASH,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAmB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation-schemas/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,eAAO,MAAM,UAAU,QACmI,CAAC;AAC3J,eAAO,MAAM,gBAAgB,QACyF,CAAC;AAEvH,eAAO,MAAM,kBAAkB,mBAAoB,8BAA8B,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation-schemas/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,eAAO,MAAM,UAAU,QACmI,CAAC;AAC3J,eAAO,MAAM,gBAAgB,QACyF,CAAC;AAEvH,eAAO,MAAM,kBAAkB,mBAAoB,8BAA8B,GAAG,IAAI,2DAgDlF,CAAC"}
|