@passflow/core 0.45.0 → 0.47.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/README.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### Version 0.47.0
6
+
7
+ Needs a Passflow server that serves `POST /auth/federated/native/start/{provider}`,
8
+ `POST /auth/federated/native/complete/{provider}` and the `google` block of `GET /app/settings`.
9
+ Against an older server `googleNativeAvailable()` answers `false` and nothing else changes.
10
+
11
+ - Added: `passflow.googleNativeSignIn(payload, options?)` signs in with Google through the
12
+ browser's own account picker (FedCM, `navigator.credentials.get`), without leaving the page.
13
+ `payload.mode` is `'active'` (a click) or `'passive'` (offered when the page opens); the picker
14
+ is always shown (`mediation: 'required'`). It returns the shapes every sign-in returns: tokens,
15
+ a pending second factor (`tfa_token`), the email-code step, or under an OIDC parent the
16
+ `redirect_url` / `form_post` answer with `sign_in_method`. It rejects with `NativeSignInError`
17
+ (`reason`: `'unsupported'`, `'provider'` or `'dismissed'`) when Google returned no token, and
18
+ emits no `Error` event for it. `payload.signal` cancels the call until Google returns the ID
19
+ token (it then rejects with the signal's reason and sends nothing more); `payload.onToken` is
20
+ called once when the token is in hand, after which the call runs to the server's answer.
21
+ A passive call must never fall back to `federatedAuthWithRedirect`: during the browser's
22
+ cool-down after a dismissed prompt it fails with `'unsupported'`, and a fallback would redirect
23
+ the page as it loads. Fall back only after a click (`'active'`).
24
+ - Added: `passflow.googleNativeAvailable()`: whether this browser has FedCM with `mode` and
25
+ `params`, the app's settings carry a `google` block, and the app does not deliver tokens as
26
+ cookies to a page on another origin than the Passflow server.
27
+ - Added: `PlatformAdapter.identityCredentials?` (types `IdentityCredentialSupport`,
28
+ `IdentityCredentialRequest`); `WebAdapter` sets it after a one-time capability check on first
29
+ read. `AppSettings.google` (`AppSettingsGoogle`), `PassflowAuthorizationResponse.form_post` and
30
+ `sign_in_method`, operation id `'federated.native'`.
31
+ - Added: the `SignIn` event of a federated redirect landing carries `provider`, the provider the
32
+ redirect was started with. `enterpriseStart` emits `SignInStart` before its request.
33
+ - The native start is anti-bot covered as `federated.start` (see [docs/anti-bot.md](docs/anti-bot.md)).
34
+
35
+ ### Version 0.46.0
36
+
37
+ - Added: `passflow.removeTrustedDevicePush(deviceId)` (`DELETE /v2/user/2fa/trusted-devices/{id}/push`)
38
+ turns off sign-in approvals (push) on one of the user's trusted devices. The device stays trusted
39
+ and keeps its device key; only its push approval goes. Rejects with `PassflowError` 404
40
+ (`error.not.found`) when the user has no such device. Errors report operation
41
+ `'2fa.trusted-devices.push.remove'`. Also on `passflow.twoFactor` as `removeTrustedDevicePush`.
42
+ Needs Passflow server v0.138.0 or later.
43
+
5
44
  ### Version 0.45.0
6
45
 
7
46
  - Added: support for the server's attack protection.