@passflow/core 0.37.0 → 0.38.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 +26 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -7
- package/dist/index.d.ts +30 -7
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## Changelog
|
|
4
4
|
|
|
5
|
+
### Version 0.38.0
|
|
6
|
+
|
|
7
|
+
- Added: `getDeviceId()` returns the id that identifies this browser or device to Passflow, the
|
|
8
|
+
same value the SDK sends with every request. It is read from storage, and minted and stored on
|
|
9
|
+
first use.
|
|
10
|
+
|
|
11
|
+
### Version 0.37.1
|
|
12
|
+
|
|
13
|
+
- Changed: a step-up commit answered 401 with `error.grant.predates_credential_reset`,
|
|
14
|
+
`error.token.access_ended` or `error.user.not_found` marks the session invalid, as
|
|
15
|
+
`error.api.request.token.invalid` already did. In cookie mode `isAuthenticated()` then answers
|
|
16
|
+
`false`. In JSON mode the mark is not read: the tokens stay and no `SignOut` is raised until the
|
|
17
|
+
next refresh fails.
|
|
18
|
+
- Changed: `setPreferredTwoFactorMethod(method)` and `passflow.twoFactor.setPreferredMethod(method)`
|
|
19
|
+
are typed to answer the method, without `null`. The server always answers the method it stored.
|
|
20
|
+
- Docs: `suggested_method` from `switchToAlternative` is worked out again at the switch and can
|
|
21
|
+
differ from the first challenge's.
|
|
22
|
+
|
|
5
23
|
### Version 0.37.0
|
|
6
24
|
|
|
7
25
|
- Added: the preferred second factor. `getPreferredTwoFactorMethod()` answers the method the
|
|
@@ -998,7 +1016,8 @@ switch (enrollment) {
|
|
|
998
1016
|
`passflow.twoFactor.getRegisteredMethods()` marks the preferred method with `preferred: true`.
|
|
999
1017
|
- **Suggested method and account hint.** A v2 challenge carries `suggested_method`, the method
|
|
1000
1018
|
sign-in offers first. From `requestChallenge` it equals `method`. From `switchToAlternative`,
|
|
1001
|
-
`method` is the one the user chose and `suggested_method`
|
|
1019
|
+
`method` is the one the user chose and `suggested_method` is the one sign-in would offer first
|
|
1020
|
+
now: the server works it out again at the switch, so it can differ from the first challenge's.
|
|
1002
1021
|
`account_hint`, on the challenge and on `getTwoFactorEnrollment()`, is a masked name of the account
|
|
1003
1022
|
signing in: the email (`h***@example.com`), else the phone (`***-***-1234`), else the username
|
|
1004
1023
|
(`u***`). It is absent when the user has none. Older servers send neither field.
|
|
@@ -1467,6 +1486,12 @@ Configuration options:
|
|
|
1467
1486
|
| `deleteUserPasskey(passkeyId)` | Delete a passkey |
|
|
1468
1487
|
| `addUserPasskey(options)` | Add a passkey to user account |
|
|
1469
1488
|
|
|
1489
|
+
**Device Methods**
|
|
1490
|
+
|
|
1491
|
+
| Method | Description |
|
|
1492
|
+
| --------------- | ------------------------------------------------------------- |
|
|
1493
|
+
| `getDeviceId()` | The id that identifies this browser or device, sent with every request |
|
|
1494
|
+
|
|
1470
1495
|
**Event Methods**
|
|
1471
1496
|
|
|
1472
1497
|
| Method | Description |
|