@passflow/react 0.17.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 +40 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +154 -133
- 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/reset-password/index.d.cts +2 -0
- package/dist/src/components/form/reset-password/index.d.ts +2 -0
- package/dist/src/components/form/reset-password/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 +5 -14
- package/dist/src/components/provider/passflow-provider.d.ts +5 -14
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/button/index.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-otp.d.cts +3 -1
- package/dist/src/components/ui/fields/field-otp.d.ts +3 -1
- package/dist/src/components/ui/fields/field-otp.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 +25 -0
- package/dist/src/components/ui/login-screen/email-code.d.ts +25 -0
- package/dist/src/components/ui/login-screen/email-code.d.ts.map +1 -0
- 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/new-password.d.cts +10 -0
- package/dist/src/components/ui/login-screen/new-password.d.ts +10 -0
- package/dist/src/components/ui/login-screen/new-password.d.ts.map +1 -0
- 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/status.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/types.d.cts +107 -3
- package/dist/src/components/ui/login-screen/types.d.ts +107 -3
- 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/index.d.cts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-email-code-step.d.cts +39 -0
- package/dist/src/hooks/use-email-code-step.d.ts +39 -0
- package/dist/src/hooks/use-email-code-step.d.ts.map +1 -0
- package/dist/src/hooks/use-join-invite.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/hooks/use-reset-password.d.cts +14 -1
- package/dist/src/hooks/use-reset-password.d.ts +14 -1
- package/dist/src/hooks/use-reset-password.d.ts.map +1 -1
- package/dist/src/hooks/use-signin.d.cts +6 -0
- package/dist/src/hooks/use-signin.d.ts +6 -0
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.cts +6 -0
- package/dist/src/hooks/use-signup.d.ts +6 -0
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- 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/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/email-verification.d.cts +18 -0
- package/dist/src/types/email-verification.d.ts +18 -0
- package/dist/src/types/email-verification.d.ts.map +1 -0
- package/dist/src/types/index.d.cts +2 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +77 -0
- package/dist/src/utils/auth-error.d.ts +77 -0
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/email-verification.d.cts +44 -0
- package/dist/src/utils/email-verification.d.ts +44 -0
- package/dist/src/utils/email-verification.d.ts.map +1 -0
- package/dist/src/utils/get-url-errors.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +3 -2
- package/dist/src/utils/index.d.ts +3 -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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@passflow/react` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.19.0] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Cross-device magic-link sign-in. With PKCE on, the tab that asked for the link shows a 4-digit code and finishes sign-in itself once the link is approved. The device that opens the link shows the request details, asks for that code, and offers Approve and Deny. Resend replaces the request, and the tab waits on the new one.
|
|
10
|
+
- `federatedLanding` prop on `Passflow` (`'app'` by default, or `'login-page'`). With `'login-page'`, PKCE on and no `parent_challenge_id`, a federated sign-in returns to the login page, which finishes it and forwards to the app with tokens, once. `useProvider` takes the same value as its third argument.
|
|
11
|
+
- `federatedLandingOutcome` on `NavigationContext`: `'signed-in'` or `'failed'` after a federated landing.
|
|
12
|
+
- `LoginScreen` states `passwordless-waiting` and `passwordless-approval`, each with Storybook stories. Also exported: the `FederatedLanding` and `FederatedLandingOutcome` types, and the approval message helpers from the utils.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Requires `@passflow/core` `^0.24.0`.
|
|
17
|
+
- Federated PKCE landings now run from a committed effect through core's `deferFederatedLanding`, so they hold under React 18 StrictMode.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- A refused parent challenge (`error.auth.flow.parent.expired`, `.not.found`, `.completed`) shows its own message on the form instead of marking the credential fields invalid. Start again reloads the page without `parent_challenge_id`.
|
|
22
|
+
- `match_code` from a passwordless start is no longer put in the query of the verify screen.
|
|
23
|
+
|
|
24
|
+
## [0.18.0] - 2026-11-03
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Email verification code step. When an app's registration policy requires a verified email, `/auth/register` and `/auth/login` may answer with a challenge instead of tokens. Sign-up and sign-in then show a code screen bound to that challenge. The submitted code goes to `/auth/validate`, and its answer continues the flow as before: second factor, PKCE or redirect. Resend repeats the original request. Cancel goes back to the form.
|
|
29
|
+
- When the server's code budget is spent and it emails a link instead, the flow shows a "check your email" screen with no code input. The link opens the reset-password screen with a continuation grant. That screen titles itself "Create your password" and signs the user in with the tokens `/auth/password/change` returns.
|
|
30
|
+
- `useEmailCodeStep()` (with `UseEmailCodeStep` and `UseEmailCodeStepOptions` types) drives the code step for custom UIs. Also exported: `EmailCodeStep`, `EmailVerificationStep`, `readEmailVerificationStep`, `emailCodeStepReducer`, `initialEmailCodeStepState`, and the error helpers `authErrorFrom`, `authRedirectErrorFrom`, `invitationJoinErrorFrom`, `emailCodeErrorMessage`, `newPasswordErrorMessage`, `serverMessageFor` and `isPasswordSavedRateLimit`.
|
|
31
|
+
- `LoginScreen` states `email-code` and `new-password`, and an `info` tone for the `status` state, each with a Storybook story.
|
|
32
|
+
- `Button` honours `aria-disabled`: it looks disabled and ignores clicks but stays focusable, so focus is not lost while a resend cooldown runs.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Requires `@passflow/core` `^0.22.0`, which adds `verifyEmailCode` and the `EmailVerificationRequired` event.
|
|
37
|
+
- For these error ids the forms show the server's localized `error.message` instead of fixed copy: `error.registration.email.domain_not_allowed`, `email.required`, `email.not_verified_by_provider`, `error.invite.email.domain_not_allowed`, `error.verification.code.rate_limited`, and wrong, expired or used codes. The same list applies to errors that arrive in the URL from a federated sign-in. Other ids keep the fixed copy.
|
|
38
|
+
- The reset-password screen is built on `LoginScreen`. Its outer wrapper class is unchanged, but the elements inside it are different, so `custom_css` rules aimed at its inner classes need updating.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- A 429 from the server is recognised whether core passes it on as a `PassflowError` or as a raw HTTP error, so rate limits show the rate-limit message instead of a generic failure.
|
|
43
|
+
- A URL error message containing a literal `%` no longer breaks decoding.
|
|
44
|
+
|
|
5
45
|
## [0.17.0] - 2026-11-03
|
|
6
46
|
|
|
7
47
|
### Changed
|