@passflow/react 0.20.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.es.js +133 -134
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/components/error/index.d.ts.map +1 -1
  8. package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
  9. package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
  10. package/dist/src/components/flow/two-factor-verify/screen.d.ts.map +1 -1
  11. package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
  12. package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
  13. package/dist/src/components/form/signed-in/index.d.cts +9 -0
  14. package/dist/src/components/form/signed-in/index.d.ts +9 -0
  15. package/dist/src/components/form/signed-in/index.d.ts.map +1 -0
  16. package/dist/src/components/form/signin/index.d.ts.map +1 -1
  17. package/dist/src/components/form/signup/index.d.ts.map +1 -1
  18. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
  19. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
  20. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
  21. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  22. package/dist/src/context/navigation-context.d.cts +6 -1
  23. package/dist/src/context/navigation-context.d.ts +6 -1
  24. package/dist/src/context/navigation-context.d.ts.map +1 -1
  25. package/dist/src/hooks/index.d.cts +1 -0
  26. package/dist/src/hooks/index.d.ts +1 -0
  27. package/dist/src/hooks/index.d.ts.map +1 -1
  28. package/dist/src/hooks/use-navigation.d.cts +2 -0
  29. package/dist/src/hooks/use-navigation.d.ts +2 -0
  30. package/dist/src/hooks/use-navigation.d.ts.map +1 -1
  31. package/dist/src/hooks/use-sign-in-ending.d.cts +16 -0
  32. package/dist/src/hooks/use-sign-in-ending.d.ts +16 -0
  33. package/dist/src/hooks/use-sign-in-ending.d.ts.map +1 -0
  34. package/dist/src/utils/index.d.cts +1 -0
  35. package/dist/src/utils/index.d.ts +1 -0
  36. package/dist/src/utils/index.d.ts.map +1 -1
  37. package/dist/src/utils/is-sign-in-page.d.cts +5 -0
  38. package/dist/src/utils/is-sign-in-page.d.ts +5 -0
  39. package/dist/src/utils/is-sign-in-page.d.ts.map +1 -0
  40. package/dist/src/utils/second-factor.d.cts +15 -1
  41. package/dist/src/utils/second-factor.d.ts +15 -1
  42. package/dist/src/utils/second-factor.d.ts.map +1 -1
  43. package/dist/style.css +1 -1
  44. package/package.json +2 -2
  45. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.cts +0 -3
  46. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts +0 -3
  47. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
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
+
5
18
  ## [0.20.0] - 2026-11-05
6
19
 
7
20
  ### Breaking
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` |