@passflow/core 0.44.0 → 0.46.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,36 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### Version 0.46.0
6
+
7
+ - Added: `passflow.removeTrustedDevicePush(deviceId)` (`DELETE /v2/user/2fa/trusted-devices/{id}/push`)
8
+ turns off sign-in approvals (push) on one of the user's trusted devices. The device stays trusted
9
+ and keeps its device key; only its push approval goes. Rejects with `PassflowError` 404
10
+ (`error.not.found`) when the user has no such device. Errors report operation
11
+ `'2fa.trusted-devices.push.remove'`. Also on `passflow.twoFactor` as `removeTrustedDevicePush`.
12
+ Needs Passflow server v0.138.0 or later.
13
+
14
+ ### Version 0.45.0
15
+
16
+ - Added: support for the server's attack protection.
17
+ - Forced challenge: when a covered sign-in call is answered 403 `error.api.anti_bot.required` or
18
+ `error.api.anti_bot.failed` with an `anti_bot` body, the SDK produces a value for the check the body
19
+ names (the built-in proof of work, or a token from `setAntiBotTokenProvider`) and sends the call once
20
+ more. This happens on any bot mode, a `bot_friendly` app included. A second refusal rejects with the new
21
+ `PassflowAntiBotChallengeError` (a `PassflowError`; `.antiBot` holds the body's `anti_bot`). The token
22
+ provider's context now also carries `provider` and `siteKey`, so the right widget can be rendered.
23
+ - Provider ids: `passflow.setRiskIdProvider(fn)` gives the Fingerprint `event_id` and the Stytch
24
+ telemetry id for the providers an app has on (`attack_protection` in `GET /app/settings`, typed as
25
+ `AppSettings.attack_protection`). They are sent fresh on every `signIn` and `signUp` request as
26
+ `X-Passflow-Fingerprint-Event` and `X-Passflow-Stytch-Telemetry`. Without a function, or when it fails,
27
+ no header is sent, a warning is logged and the sign-in goes on. The SDK loads no vendor script. See
28
+ `docs/risk-provider-ids.md`.
29
+ - A federated PKCE sign-in that lands with `#tfa_token` instead of a code (redirect or popup) keeps its
30
+ verifier for the second factor, so the code the second factor answers with is exchanged and tokens are
31
+ issued.
32
+ - `SIGN_IN_REFUSED_ERROR_ID` (`error.api.sign_in.refused`) is exported; that answer is a plain
33
+ `PassflowError`.
34
+
5
35
  ### Version 0.44.0
6
36
 
7
37
  - Added: warns once in the console when a tenant call runs on a token without tenant membership