@passflow/core 0.42.1 → 0.43.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,29 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### Version 0.43.0
6
+
7
+ - Added: `passflow.devicePushProof(use, jti)` signs a push-approval device proof (`push_enrol`,
8
+ `push_info`, `push_approve`, `push_deny`) with the browser's enrolled device key and the next
9
+ counter value, the one key and counter that sign-in and refresh proofs use. It resolves
10
+ `undefined` with `deviceKey` off, in BFF mode, without IndexedDB or WebCrypto, or without an
11
+ enrolled key. `pushChallengeOf(challengeId, number?)` computes the `jti` the server expects for
12
+ `push_info`, `push_deny` and `push_approve`. New type `DevicePushProofUse`; `DeviceProofUse` now
13
+ includes the four push uses. See [docs/device-key.md](docs/device-key.md).
14
+ - Added: `passflow.twoFactor.pushStatus(challengeId)` (`POST /v2/auth/2fa/push/status`) reads the
15
+ state of a sign-in's push approval: `{ status: 'pending', expires_in_seconds }` or
16
+ `{ status: 'approved' }`. A denied, expired or unconfigured push rejects with `PassflowError`
17
+ (`error.2fa.push.denied`, `error.2fa.push.expired`, `error.2fa.push.not_configured`) and one
18
+ `Error` with operation `2fa.push.status`.
19
+ - Added: `TwoFactorChallengeResponse` carries `number_match` and `expires_in_seconds` on push
20
+ challenges.
21
+ - Added: `twoFactor.verifyV2({ challenge_id, method: 'push_webpush' })` finishes an approved push
22
+ sign-in. It sends no `response` key.
23
+ - Changed: `TwoFactorVerifyRequestV2` is now a union type, so a push completion needs no
24
+ `response` while every other method still must send one. Existing calls compile unchanged, but
25
+ `interface X extends TwoFactorVerifyRequestV2` no longer compiles; use an intersection
26
+ (`type X = TwoFactorVerifyRequestV2 & { … }`) instead.
27
+
5
28
  ### Version 0.42.1
6
29
 
7
30
  - Fixed: after a hosted sign-in through a SAML connection with SP-initiated logout,
@@ -1191,6 +1214,9 @@ switch (enrollment) {
1191
1214
  `expires_in_minutes`; `resend: true` sends a new code. Recovery codes for these users, the
1192
1215
  address-change proof and the discovery fields are in
1193
1216
  [docs/two-factor-codes.md](docs/two-factor-codes.md).
1217
+ - **Push approval.** A `push_webpush` challenge carries `number_match` and `expires_in_seconds`;
1218
+ poll `pushStatus(challengeId)`, then finish with `verifyV2({ challenge_id, method: 'push_webpush' })`
1219
+ and no `response`. See [docs/two-factor-codes.md](docs/two-factor-codes.md).
1194
1220
  - **The emailed link.** Call `validateTwoFactorSetupMagicLink(token)` on its page. While that session
1195
1221
  is active, `getTwoFactorStatus`, `beginTwoFactorSetup` and `confirmTwoFactorSetup` run on it instead
1196
1222
  of the stored session, and a correct confirm ends it. A used link reads as error code `ALREADY_USED`.