@passflow/core 0.42.0 → 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 +43 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -20
- package/dist/index.d.ts +85 -20
- package/dist/index.mjs +1254 -1230
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
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
|
+
|
|
28
|
+
### Version 0.42.1
|
|
29
|
+
|
|
30
|
+
- Fixed: after a hosted sign-in through a SAML connection with SP-initiated logout,
|
|
31
|
+
`logOut({ followSamlLogout: true })` now goes to the identity provider's logout address instead
|
|
32
|
+
of `/oidc/end_session`, so the identity provider ends its session too. Before, `POST /user/logout`
|
|
33
|
+
had already ended the session, so `/oidc/end_session` sent no LogoutRequest and the identity
|
|
34
|
+
provider's session stayed alive. Without the option, or when the answer has no
|
|
35
|
+
`saml_logout_url`, a hosted sign-in still goes to `/oidc/end_session`.
|
|
36
|
+
- Fixed: after a hosted sign-in the `POST /user/logout` body carries `post_logout_redirect_uri`
|
|
37
|
+
even without the option: `postLogoutRedirectUri`, else the address the hosted sign-in landed on.
|
|
38
|
+
It is the same address the `/oidc/end_session` visit uses, so the identity provider's logout
|
|
39
|
+
returns the browser to the app instead of Passflow's signed-out page. A sign-in made in the app
|
|
40
|
+
itself sends the same body as before.
|
|
41
|
+
|
|
5
42
|
### Version 0.42.0
|
|
6
43
|
|
|
7
44
|
- Added: `deviceKey: true` in the `Passflow` config binds sessions to this browser. The SDK keeps a
|
|
@@ -517,7 +554,9 @@ await passflow.logOut({ postLogoutRedirectUri: "https://app.example.com/signed-o
|
|
|
517
554
|
|
|
518
555
|
A session from a SAML connection can also end at the identity provider: `logOut()` resolves with
|
|
519
556
|
`{ samlLogoutUrl }` when the server returns one, and `logOut({ followSamlLogout: true })` goes there.
|
|
520
|
-
|
|
557
|
+
After a hosted sign-in it goes there instead of `/oidc/end_session`, so the identity provider ends
|
|
558
|
+
its session too. The logout request carries `postLogoutRedirectUri` when set; after a hosted
|
|
559
|
+
sign-in it carries the address the hosted sign-in landed on by default. The identity provider's
|
|
521
560
|
logout then returns the browser there instead of Passflow's signed-out page (Passflow server
|
|
522
561
|
v0.137.1 or later; older servers ignore it). See [docs/enterprise-sso.md](docs/enterprise-sso.md#single-logout-saml).
|
|
523
562
|
|
|
@@ -1175,6 +1214,9 @@ switch (enrollment) {
|
|
|
1175
1214
|
`expires_in_minutes`; `resend: true` sends a new code. Recovery codes for these users, the
|
|
1176
1215
|
address-change proof and the discovery fields are in
|
|
1177
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).
|
|
1178
1220
|
- **The emailed link.** Call `validateTwoFactorSetupMagicLink(token)` on its page. While that session
|
|
1179
1221
|
is active, `getTwoFactorStatus`, `beginTwoFactorSetup` and `confirmTwoFactorSetup` run on it instead
|
|
1180
1222
|
of the stored session, and a correct confirm ends it. A used link reads as error code `ALREADY_USED`.
|