@passflow/react 0.12.0 → 0.13.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +112 -110
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
  7. package/dist/src/components/form/reset-password/index.d.ts +1 -0
  8. package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
  9. package/dist/src/components/form/signin/index.d.ts.map +1 -1
  10. package/dist/src/components/form/signup/index.d.ts +1 -0
  11. package/dist/src/components/form/signup/index.d.ts.map +1 -1
  12. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +2 -0
  13. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
  14. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +2 -0
  15. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
  16. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts +1 -0
  17. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
  18. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts +2 -1
  19. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
  20. package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts +1 -0
  21. package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts.map +1 -1
  22. package/dist/src/components/provider/passflow-provider.d.ts +8 -0
  23. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  24. package/dist/src/components/ui/button/index.d.ts +4 -1
  25. package/dist/src/components/ui/button/index.d.ts.map +1 -1
  26. package/dist/src/context/navigation-context.d.ts +10 -0
  27. package/dist/src/context/navigation-context.d.ts.map +1 -1
  28. package/dist/src/hooks/index.d.ts +1 -0
  29. package/dist/src/hooks/index.d.ts.map +1 -1
  30. package/dist/src/hooks/use-navigation.d.ts +2 -0
  31. package/dist/src/hooks/use-navigation.d.ts.map +1 -1
  32. package/dist/src/hooks/use-trusted-devices.d.ts +21 -0
  33. package/dist/src/hooks/use-trusted-devices.d.ts.map +1 -0
  34. package/dist/src/hooks/use-two-factor-verify.d.ts +5 -3
  35. package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
  36. package/dist/src/utils/index.d.ts +1 -0
  37. package/dist/src/utils/index.d.ts.map +1 -1
  38. package/dist/src/utils/second-factor.d.ts +21 -0
  39. package/dist/src/utils/second-factor.d.ts.map +1 -0
  40. package/dist/style.css +1 -1
  41. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to `@passflow/react` are documented in this file.
4
4
 
5
+ ## [0.13.0] - 2026-10-30
6
+
7
+ ### Added
8
+
9
+ - Every sign-in path reaches the 2FA screen when the server asks for a second factor: sign-up, password reset, the typed OTP and the emailed link join sign-in's password and passkey paths, and `PassflowProvider` sends a federated landing that carries `#tfa_token=` there too. The route is the mounted flow's own, or the new `twoFactorVerifyPath` prop on `PassflowProvider`, `SignUp`, `VerifyChallengeOTP` and `ResetPassword`. A signed-in user who opens a `#tfa_token=` link stays where they are.
10
+ - A "Trust this device" switch on the 2FA verify and recovery forms, off by default and labelled through `trustDeviceLabel`. Ticked, the server trusts the browser, and its later sign-ins skip the second factor while the app trusts devices.
11
+ - `useTwoFactorVerify().verify(code, options?)` and `.useRecoveryCode(code, options?)` take `{ trustDevice }`.
12
+ - `useTrustedDevices()` lists the user's trusted devices on the app and revokes one.
13
+ - `Button` gains a `link` variant, which the 2FA forms' "use a recovery code" links now use; `Switch` gets its Storybook stories.
14
+
15
+ ### Changed
16
+
17
+ - Requires `@passflow/core` 0.18.0 or later, up from 0.17.0.
18
+
19
+ Needs a server that asks for the second factor on every sign-in path and sets trusted-device cookies (Passflow `src/v0.18.0`).
20
+
5
21
  ## [0.12.0] - 2026-10-29
6
22
 
7
23
  ### Added
@@ -11,7 +27,7 @@ All notable changes to `@passflow/react` are documented in this file.
11
27
  - A `second-factor` `LoginScreen` state, with a catalogued Storybook story for entering a code, checking it, and a wrong code. It uses the sign-in's own two-factor copy and switches between an authenticator code and a recovery code.
12
28
  - The device error taxonomy gains `second_factor_invalid` and `missing_second_factor`, each with the page's own copy.
13
29
 
14
- Needs a server that sends `second_factor_required` (Passflow `src/v0.15.1`). Against an older server the page behaves as in 0.11.0.
30
+ Needs a server that sends `second_factor_required` (Passflow `src/v0.16.1`). Against an older server the page behaves as in 0.11.0.
15
31
 
16
32
  ## [0.11.0] - 2026-10-28
17
33