@passflow/core 0.43.1 → 0.45.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,40 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### Version 0.45.0
6
+
7
+ - Added: support for the server's attack protection.
8
+ - Forced challenge: when a covered sign-in call is answered 403 `error.api.anti_bot.required` or
9
+ `error.api.anti_bot.failed` with an `anti_bot` body, the SDK produces a value for the check the body
10
+ names (the built-in proof of work, or a token from `setAntiBotTokenProvider`) and sends the call once
11
+ more. This happens on any bot mode, a `bot_friendly` app included. A second refusal rejects with the new
12
+ `PassflowAntiBotChallengeError` (a `PassflowError`; `.antiBot` holds the body's `anti_bot`). The token
13
+ provider's context now also carries `provider` and `siteKey`, so the right widget can be rendered.
14
+ - Provider ids: `passflow.setRiskIdProvider(fn)` gives the Fingerprint `event_id` and the Stytch
15
+ telemetry id for the providers an app has on (`attack_protection` in `GET /app/settings`, typed as
16
+ `AppSettings.attack_protection`). They are sent fresh on every `signIn` and `signUp` request as
17
+ `X-Passflow-Fingerprint-Event` and `X-Passflow-Stytch-Telemetry`. Without a function, or when it fails,
18
+ no header is sent, a warning is logged and the sign-in goes on. The SDK loads no vendor script. See
19
+ `docs/risk-provider-ids.md`.
20
+ - A federated PKCE sign-in that lands with `#tfa_token` instead of a code (redirect or popup) keeps its
21
+ verifier for the second factor, so the code the second factor answers with is exchanged and tokens are
22
+ issued.
23
+ - `SIGN_IN_REFUSED_ERROR_ID` (`error.api.sign_in.refused`) is exported; that answer is a plain
24
+ `PassflowError`.
25
+
26
+ ### Version 0.44.0
27
+
28
+ - Added: warns once in the console when a tenant call runs on a token without tenant membership
29
+ (no `passflow_tm` claim). `passflow.tenant.createTenant`, `getTenantDetails`,
30
+ `getTenantUserMembership` and `getUserTenantMembership` (and `passflow.createTenant`) check the
31
+ stored access token; without the claim, the sign-in did not ask for the tenant scope. The
32
+ warning says to add `'access:tenant:all'` to the app's scopes (for example `PassflowProvider`
33
+ `scopes`) and sign in again, because a refresh keeps the old scopes. Once per `Passflow`
34
+ instance; return values, errors and default scopes are unchanged. Token parsing, sign-in,
35
+ refresh and other tenant-service calls stay silent, and BFF and cookie modes, which keep no
36
+ access token in storage, never warn. `TenantService` takes an optional fourth constructor
37
+ argument, `readStoredAccessToken`.
38
+
5
39
  ### Version 0.43.1
6
40
 
7
41
  - Fixed: `TwoFactorTrustedDevice` now describes every field of `GET /v2/user/2fa/trusted-devices`: