@passflow/core 0.46.0 → 0.48.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 +46 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +230 -11
- package/dist/index.d.ts +230 -11
- package/dist/index.mjs +1506 -1310
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
## Changelog
|
|
4
4
|
|
|
5
|
+
### Version 0.48.0
|
|
6
|
+
|
|
7
|
+
Works with every Passflow server. The server sends `attack_protection.challenge` from
|
|
8
|
+
https://github.com/usepassflow/passflow/pull/693 on; a server that does not send it keeps the
|
|
9
|
+
previous behaviour.
|
|
10
|
+
|
|
11
|
+
- Changed: when `GET /app/settings` carries `"attack_protection": { "challenge": true }`,
|
|
12
|
+
`federatedAuthWithPopup` and `federatedAuthWithRedirect` start with a POST, as on a `human_only`
|
|
13
|
+
app, instead of navigating to the GET start. A forced challenge on that start now reaches
|
|
14
|
+
`setAntiBotTokenProvider` (or the built-in check) and the start is sent once more. Enterprise
|
|
15
|
+
sign-in through these flows (`conn_<connection_id>`) and `enterpriseStart()` behave the same.
|
|
16
|
+
A missing field, or any value but `true`, keeps the navigation on a bot-friendly app.
|
|
17
|
+
- Added: `AttackProtectionSettings.challenge?: boolean`. The provider id code ignores it: a block
|
|
18
|
+
with only `challenge` sends no `X-Passflow-Fingerprint-Event` / `X-Passflow-Stytch-Telemetry`
|
|
19
|
+
and logs no warning.
|
|
20
|
+
|
|
21
|
+
### Version 0.47.0
|
|
22
|
+
|
|
23
|
+
Needs a Passflow server that serves `POST /auth/federated/native/start/{provider}`,
|
|
24
|
+
`POST /auth/federated/native/complete/{provider}` and the `google` block of `GET /app/settings`.
|
|
25
|
+
Against an older server `googleNativeAvailable()` answers `false` and nothing else changes.
|
|
26
|
+
|
|
27
|
+
- Added: `passflow.googleNativeSignIn(payload, options?)` signs in with Google through the
|
|
28
|
+
browser's own account picker (FedCM, `navigator.credentials.get`), without leaving the page.
|
|
29
|
+
`payload.mode` is `'active'` (a click) or `'passive'` (offered when the page opens); the picker
|
|
30
|
+
is always shown (`mediation: 'required'`). It returns the shapes every sign-in returns: tokens,
|
|
31
|
+
a pending second factor (`tfa_token`), the email-code step, or under an OIDC parent the
|
|
32
|
+
`redirect_url` / `form_post` answer with `sign_in_method`. It rejects with `NativeSignInError`
|
|
33
|
+
(`reason`: `'unsupported'`, `'provider'` or `'dismissed'`) when Google returned no token, and
|
|
34
|
+
emits no `Error` event for it. `payload.signal` cancels the call until Google returns the ID
|
|
35
|
+
token (it then rejects with the signal's reason and sends nothing more); `payload.onToken` is
|
|
36
|
+
called once when the token is in hand, after which the call runs to the server's answer.
|
|
37
|
+
A passive call must never fall back to `federatedAuthWithRedirect`: during the browser's
|
|
38
|
+
cool-down after a dismissed prompt it fails with `'unsupported'`, and a fallback would redirect
|
|
39
|
+
the page as it loads. Fall back only after a click (`'active'`).
|
|
40
|
+
- Added: `passflow.googleNativeAvailable()`: whether this browser has FedCM with `mode` and
|
|
41
|
+
`params`, the app's settings carry a `google` block, and the app does not deliver tokens as
|
|
42
|
+
cookies to a page on another origin than the Passflow server.
|
|
43
|
+
- Added: `PlatformAdapter.identityCredentials?` (types `IdentityCredentialSupport`,
|
|
44
|
+
`IdentityCredentialRequest`); `WebAdapter` sets it after a one-time capability check on first
|
|
45
|
+
read. `AppSettings.google` (`AppSettingsGoogle`), `PassflowAuthorizationResponse.form_post` and
|
|
46
|
+
`sign_in_method`, operation id `'federated.native'`.
|
|
47
|
+
- Added: the `SignIn` event of a federated redirect landing carries `provider`, the provider the
|
|
48
|
+
redirect was started with. `enterpriseStart` emits `SignInStart` before its request.
|
|
49
|
+
- The native start is anti-bot covered as `federated.start` (see [docs/anti-bot.md](docs/anti-bot.md)).
|
|
50
|
+
|
|
5
51
|
### Version 0.46.0
|
|
6
52
|
|
|
7
53
|
- Added: `passflow.removeTrustedDevicePush(deviceId)` (`DELETE /v2/user/2fa/trusted-devices/{id}/push`)
|