@passflow/react 0.21.0 → 0.23.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 (44) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.es.js +102 -104
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/flow/consent/index.d.cts +1 -1
  7. package/dist/src/components/flow/consent/index.d.ts +1 -1
  8. package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.cts +2 -2
  9. package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.ts +2 -2
  10. package/dist/src/components/form/verify-challenge/verify-challenge-approval.d.ts.map +1 -1
  11. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
  12. package/dist/src/components/provider/passflow-provider.d.cts +22 -1
  13. package/dist/src/components/provider/passflow-provider.d.ts +22 -1
  14. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  15. package/dist/src/components/ui/login-screen/passwordless-approval.d.ts.map +1 -1
  16. package/dist/src/components/ui/login-screen/passwordless-waiting.d.ts.map +1 -1
  17. package/dist/src/components/ui/login-screen/types.d.cts +3 -6
  18. package/dist/src/components/ui/login-screen/types.d.ts +3 -6
  19. package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
  20. package/dist/src/context/passflow-context.d.cts +19 -2
  21. package/dist/src/context/passflow-context.d.ts +19 -2
  22. package/dist/src/context/passflow-context.d.ts.map +1 -1
  23. package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
  24. package/dist/src/hooks/use-auth-cloud-redirect.d.ts.map +1 -1
  25. package/dist/src/hooks/use-consent.d.cts +9 -8
  26. package/dist/src/hooks/use-consent.d.ts +9 -8
  27. package/dist/src/hooks/use-consent.d.ts.map +1 -1
  28. package/dist/src/hooks/use-provider.d.ts.map +1 -1
  29. package/dist/src/hooks/use-sign-in-ending.d.cts +4 -1
  30. package/dist/src/hooks/use-sign-in-ending.d.ts +4 -1
  31. package/dist/src/hooks/use-sign-in-ending.d.ts.map +1 -1
  32. package/dist/src/index.d.cts +1 -0
  33. package/dist/src/index.d.ts +1 -0
  34. package/dist/src/index.d.ts.map +1 -1
  35. package/dist/src/utils/get-url-with-tokens.d.cts +6 -1
  36. package/dist/src/utils/get-url-with-tokens.d.ts +6 -1
  37. package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -1
  38. package/dist/src/utils/hand-off.d.cts +15 -0
  39. package/dist/src/utils/hand-off.d.ts +15 -0
  40. package/dist/src/utils/hand-off.d.ts.map +1 -0
  41. package/dist/src/utils/second-factor.d.cts +2 -2
  42. package/dist/src/utils/second-factor.d.ts +2 -2
  43. package/dist/src/utils/second-factor.d.ts.map +1 -1
  44. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  All notable changes to `@passflow/react` are documented in this file.
4
4
 
5
+ ## [0.23.0] - 2026-11-08
6
+
7
+ ### Changed
8
+
9
+ - Requires `@passflow/core` ^0.29.0 (was ^0.28.0). Its `authRedirect()` is now async and follows the app's mode: in SDK mode hosted sign-in returns an authorization code, which core redeems with PKCE. Core accepts URL tokens only for apps in Simple mode.
10
+ - After a sign-in that leaves for an external target, the hosted login reads the app's mode from `getAppSettings()`. A Simple-mode app gets its tokens in the URL fragment. An SDK-mode app, or an app whose settings don't say Simple, is sent to the address with nothing in it. If the settings can't be read, the screen shows "unavailable" with a retry, and nothing is sent.
11
+ - New `PassflowProvider` prop `handOff: { scopes?, state? }`: the scopes and `state` the app asked for when it opened the hosted login. In Simple mode `refresh_token` goes to the app only when those scopes include `offline` or `offline_access`, and `state` is echoed in the fragment. Without `handOff`, `getUrlWithTokens` returns every stored token, as before.
12
+ - A federated sign-in start carries `parent_challenge_id` from the page URL. In Simple mode it also carries the app's `state` and asks for the app's scopes. In SDK mode it asks for the sign-in scopes.
13
+ - Email-link approval is one click: the approval page shows the app and where and when the sign-in started, with "Sign in" and "This wasn't me" equally prominent. There is no code to type, and the waiting tab shows none. This needs the matching Passflow server, which accepts an approval without a code. `LoginPasswordlessWaitingState.matchCode` is removed, and `LoginPasswordlessApprovalFormState.onApprove` takes no argument.
14
+ - A waiting tab under an OIDC sign-in follows the `redirect_url` its status poll returns.
15
+
16
+ ### Added
17
+
18
+ - The provider takes hosted sign-in code landings (`SignIn` source `oidc-landing`) and applies their tokens to the live instance. A refused landing (`Error` op `oidc.redirect`) sets `federatedLandingOutcome` to `'failed'`.
19
+ - A landing with `#access_token=` in the fragment is recognised and waits for the app id, like `?access_token=`.
20
+
21
+ ### Fixed
22
+
23
+ - The sign-in page could render empty when app settings arrived while the app id was still being discovered, or when a late settings write overwrote values set meanwhile.
24
+ - The provider no longer rebuilds its `Passflow` instance when settings arrive or when the scopes are recomputed to the same set. `keyStoragePrefix`, `tokenExchange`, `platform`, `refreshCoordination` and `refreshStrikes` are read when the provider mounts.
25
+ - `useAuthCloudRedirect` no longer leaves an unhandled promise rejection. Failures arrive as an `Error` event.
26
+ - The hosted session exchange refreshes an expired access token before it asks for a code, so silent sign-in keeps working after the access token expires.
27
+ - A `#tfa_token` landing makes no session-exchange request. Under an OIDC sign-in it shows the second-factor screen even when a hosted session already exists.
28
+
29
+ ## [0.22.0] - 2026-11-08
30
+
31
+ ### Changed
32
+
33
+ - The consent page reads `consent_challenge_id` from its URL, where it used to read `parent_challenge_id`. It needs a Passflow server that sends `consent_challenge_id` in the consent link. Against an older server it shows "Invalid consent link".
34
+
5
35
  ## [0.21.0] - 2026-11-07
6
36
 
7
37
  ### Changed