@passflow/react 0.11.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.
- package/CHANGELOG.md +27 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +122 -111
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/device-verify/screen.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.ts +1 -0
- package/dist/src/components/form/reset-password/index.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 +1 -0
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- 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.ts +2 -0
- 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-otp-manual.d.ts +1 -0
- 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 +2 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts +1 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.ts +8 -0
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/button/index.d.ts +4 -1
- package/dist/src/components/ui/button/index.d.ts.map +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/second-factor.d.ts +4 -0
- package/dist/src/components/ui/login-screen/second-factor.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/types.d.ts +16 -1
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/context/navigation-context.d.ts +10 -0
- package/dist/src/context/navigation-context.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-device-verify.d.ts +17 -0
- package/dist/src/hooks/use-device-verify.d.ts.map +1 -1
- 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-trusted-devices.d.ts +21 -0
- package/dist/src/hooks/use-trusted-devices.d.ts.map +1 -0
- package/dist/src/hooks/use-two-factor-verify.d.ts +5 -3
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
- package/dist/src/types/device-errors.d.ts +4 -0
- package/dist/src/types/device-errors.d.ts.map +1 -1
- package/dist/src/utils/classify-device-error.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/second-factor.d.ts +21 -0
- package/dist/src/utils/second-factor.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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
|
+
|
|
21
|
+
## [0.12.0] - 2026-10-29
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- The device verification page asks for a second factor when the CLI's app requires one. `/oidc/device/authenticate` says so with `second_factor_required` and `second_factor_methods`, and that ticket can no longer approve. The page asks for an authenticator code, or a recovery code instead, posts it to `/oidc/device/second-factor`, and approves with the ticket that answers, which records both factors. A consent tap and the passkey mode approve straight after the factor; full login lands on the usual approval screen.
|
|
26
|
+
- `useDeviceVerify` gains a `second_factor` status, `isSecondFactorPending`, `secondFactorMethods` and `submitSecondFactor`.
|
|
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.
|
|
28
|
+
- The device error taxonomy gains `second_factor_invalid` and `missing_second_factor`, each with the page's own copy.
|
|
29
|
+
|
|
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.
|
|
31
|
+
|
|
5
32
|
## [0.11.0] - 2026-10-28
|
|
6
33
|
|
|
7
34
|
### Changed
|