@passflow/react 0.19.0 → 0.20.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 +45 -0
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +135 -144
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/error/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.cts +0 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts +0 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/screen.d.cts +5 -0
- package/dist/src/components/flow/two-factor-verify/screen.d.ts +5 -0
- package/dist/src/components/flow/two-factor-verify/screen.d.ts.map +1 -0
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signed-in/index.d.cts +9 -0
- package/dist/src/components/form/signed-in/index.d.ts +9 -0
- package/dist/src/components/form/signed-in/index.d.ts.map +1 -0
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-setup/setup-screen.d.cts +29 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts +29 -0
- package/dist/src/components/form/two-factor-setup/setup-screen.d.ts.map +1 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +3 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +3 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +5 -2
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +5 -2
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +5 -3
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +5 -3
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/index.d.cts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts +1 -1
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/login-screen.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/shared.d.cts +4 -0
- package/dist/src/components/ui/login-screen/shared.d.ts +4 -0
- package/dist/src/components/ui/login-screen/shared.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/status.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/two-factor-code.d.cts +8 -0
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts +8 -0
- package/dist/src/components/ui/login-screen/two-factor-code.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.cts +5 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts +5 -0
- package/dist/src/components/ui/login-screen/two-factor-recovery-codes.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.cts +4 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.ts +4 -0
- package/dist/src/components/ui/login-screen/two-factor-setup.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/types.d.cts +115 -6
- package/dist/src/components/ui/login-screen/types.d.ts +115 -6
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/context/navigation-context.d.cts +6 -1
- package/dist/src/context/navigation-context.d.ts +6 -1
- 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-navigation.d.cts +2 -0
- package/dist/src/hooks/use-navigation.d.ts +2 -0
- package/dist/src/hooks/use-navigation.d.ts.map +1 -1
- package/dist/src/hooks/use-sign-in-ending.d.cts +16 -0
- package/dist/src/hooks/use-sign-in-ending.d.ts +16 -0
- package/dist/src/hooks/use-sign-in-ending.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.cts +58 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts +58 -0
- package/dist/src/hooks/use-two-factor-enrollment.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +5 -15
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts +5 -15
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-setup.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
- package/dist/src/types/two-factor-errors.d.cts +1 -2
- package/dist/src/types/two-factor-errors.d.ts +1 -2
- package/dist/src/types/two-factor-errors.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.cts +23 -0
- package/dist/src/utils/auth-error.d.ts +23 -0
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/classify-two-factor-error.d.cts +5 -6
- package/dist/src/utils/classify-two-factor-error.d.ts +5 -6
- package/dist/src/utils/classify-two-factor-error.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +4 -3
- package/dist/src/utils/index.d.ts +4 -3
- 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 -0
- package/dist/src/utils/second-factor.d.cts +22 -2
- package/dist/src/utils/second-factor.d.ts +22 -2
- package/dist/src/utils/second-factor.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.cts +0 -3
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts +0 -3
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@passflow/react` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.20.1] - 2026-11-05
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- A federated sign-in that owes its second factor no longer ends on a bare 404 on the hosted login. The federated return carries `#tfa_token=` and no `appid`, so the provider ran app-id discovery: that held back the flow, so the landing navigated to the unprefixed `/two-factor-verify`, and it picked the default login app, under which the server refuses the token. On a page served by the API's own origin, with no app id configured, the provider now takes the app from the token's `aud` and skips discovery. It also adds `appid` to the 2FA URL, so a reload keeps the app. An `appId` prop still wins, and any other page behaves as before.
|
|
10
|
+
- A sign-in with nowhere to go now says so. When the target is the sign-in page itself, or there is no target, the user sees "You're signed in" and stays, with no tokens in the address bar, instead of landing back on the sign-in form as if it had failed. This covers sign-in, sign-up, magic link, OTP, 2FA, invitation and password reset endings, and a federated landing on the login page, with or without PKCE. Any other target still gets the redirect.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Validate the redirect target before completing sign-in. Sign-in now goes through `checkRedirectUrl` before it leaves for a full URL passed in `successAuthRedirect`, and an error screen appears if that fails. Add the URLs you pass to the app's redirect URLs. Requires `@passflow/core` 0.26.0 and a server with `POST /auth/redirect/check`.
|
|
15
|
+
- "Go back" on the error screen now only follows a path on the current origin. Any other target goes to `/`.
|
|
16
|
+
- The 2FA finished screen now reads "You're signed in", and the old "Successful verification! But there is no redirect URL" screen is gone.
|
|
17
|
+
|
|
18
|
+
## [0.20.0] - 2026-11-05
|
|
19
|
+
|
|
20
|
+
### Breaking
|
|
21
|
+
|
|
22
|
+
- The server must have the enrolment route (`GET /auth/2fa/enrollment`) before an app takes this version. A server without it answers 404, and every 2FA sign-in stops at "We could not continue your sign-in. Try again."
|
|
23
|
+
- Removed props: `signInPath` on `TwoFactorVerifyForm` and `TwoFactorRecoveryForm` (use `onBackToSignIn`), `twoFactorSetupPath` on `TwoFactorVerifyForm` and `TwoFactorVerifyFlow`, `useV2Flow` on `TwoFactorVerifyFlow`.
|
|
24
|
+
- Removed fields: `retryCountdown` on `useTwoFactorSetupMagicLink`'s return, `shouldAutoRedirect` on `TwoFactorError`.
|
|
25
|
+
- The wrapper classes `passflow-2fa-verify`, `passflow-2fa-recovery` and `passflow-2fa-setup` are gone, so custom CSS on them stops matching. These screens now render through `LoginScreen`.
|
|
26
|
+
- `TwoFactorSetupForm` no longer resets after `onComplete` when you pass one.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- First-time 2FA enrolment on the verify screen. The screen reads the server's enrolment state before asking for a code, then shows one of: the code entry, for an enrolled user; an emailed setup link, sent only on a tap with up to three sends; setup on the spot, with QR, secret, code and recovery codes, finishing with the same code; or "contact your administrator".
|
|
31
|
+
- `LoginScreen` states `two-factor-code`, `two-factor-setup` and `two-factor-recovery-codes`, each with Storybook stories. `LoginStatus` gains a secondary action, a busy primary action, an error line and a `working` tone. Also exported: their types, `signInSearch` and `isTerminalTwoFactorError`.
|
|
32
|
+
- `onEnded` and `onBackToSignIn` on `TwoFactorVerifyForm` and `TwoFactorRecoveryForm`, `onBackToSignIn` on `TwoFactorSetupForm`, and the `rate_limited` type on `TwoFactorErrorType`.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Requires `@passflow/core` `^0.25.0`.
|
|
37
|
+
- The setup link page uses the same look as direct setup and calls only what a link session may call. A used link says so and offers sign-in. Link error screens have the heading "We could not open this link".
|
|
38
|
+
- The sign-in search (`appid`, `parent_challenge_id`) now carries across the second factor screens, without attempt secrets such as `otp` or `token`.
|
|
39
|
+
- `.passflow-button--clean` has a transparent background, not white, so its text can be read in the dark theme.
|
|
40
|
+
- Code boxes narrow to fit their container, so six-digit boxes are 47.67px wide rather than 48px.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- The dead Set Up 2FA link on the verify screen is gone. It left a new user on a required app with no way forward.
|
|
45
|
+
- Eight-digit TOTP codes no longer run past the card.
|
|
46
|
+
- A rate limit on any of these screens shows its own message, not the server's fixed "15 minutes" text.
|
|
47
|
+
- A verify or recovery form whose sign-in has ended now says so and offers sign-in. Its "Redirecting to sign in..." message never redirected.
|
|
48
|
+
- `TwoFactorChallenge` sends one challenge under React StrictMode, not two, so it no longer spends two of the three budget units.
|
|
49
|
+
|
|
5
50
|
## [0.19.0] - 2026-11-04
|
|
6
51
|
|
|
7
52
|
### Added
|
package/README.md
CHANGED
|
@@ -256,7 +256,7 @@ The whole sign-in experience on its own pages: sign-in, sign-up, one-time codes,
|
|
|
256
256
|
|
|
257
257
|
| Prop | Type | Description |
|
|
258
258
|
|------|------|-------------|
|
|
259
|
-
| successAuthRedirect | string | URL to redirect after successful authentication |
|
|
259
|
+
| successAuthRedirect | string | URL to redirect after successful authentication. A full URL must be in the app's redirect URLs. |
|
|
260
260
|
| federatedDisplayMode | "modal" \| "redirect" | Federated authentication display mode |
|
|
261
261
|
| pathPrefix | string | Where the flow lives, such as `/auth`. Optional: worked out from the first URL |
|
|
262
262
|
| routerType | "browser" \| "hash" \| "memory" | The history the flow keeps. Default `browser` |
|