@passflow/core 0.49.0 → 0.49.1
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 +23 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -10
- package/dist/index.d.ts +21 -10
- package/dist/index.mjs +246 -238
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,14 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## Changelog
|
|
4
4
|
|
|
5
|
+
### Version 0.49.1
|
|
6
|
+
|
|
7
|
+
Works with every Passflow server.
|
|
8
|
+
|
|
9
|
+
- Fixed: `passflow.tenant.getTenantUserMembership()` threw `users_in_groups?.forEach is not a function`
|
|
10
|
+
for every tenant with members. The server sends `users_in_groups` as an object that maps a group id to
|
|
11
|
+
that group's members, and the SDK read it as an array.
|
|
12
|
+
- Types: `PassflowTenantResponse.users_in_groups` is now `Record<string, PassflowUserWithRoles[]>`.
|
|
13
|
+
`PassflowUserWithRoles` now describes what the server sends for one member: the user's profile fields
|
|
14
|
+
(`id`, `username`, `email`, `phone`, names, `picture`, `email_verified`, `phone_verified`), `roles`
|
|
15
|
+
(role id → role name) and `joined_via`. Its old fields (`user_id`, `phone_number`, `group_id`,
|
|
16
|
+
`role_id`, `tenant_id`) never came from the server. `PassflowUserInGroup` is deprecated: the server
|
|
17
|
+
never sends that shape.
|
|
18
|
+
- Breaking for types only: `PassflowUserWithRoles` and `PassflowTenantResponse.users_in_groups` change
|
|
19
|
+
shape, so code typed against the old fields (`users_in_groups[i].user`, `.group_id`, `user_id`,
|
|
20
|
+
`phone_number`) stops compiling. Such code never matched a server response; read the group-id map
|
|
21
|
+
instead, e.g. `Object.entries(details.users_in_groups ?? {})`.
|
|
22
|
+
- Changed: in `TenantUserMembership`, `User.name` is the display name: the preferred username, else the
|
|
23
|
+
given and family name, else the nickname, else the username, else `null`. The server sends no `name`
|
|
24
|
+
field. An empty email or phone is `null`. The rest of the return shape is unchanged.
|
|
25
|
+
|
|
5
26
|
### Version 0.49.0
|
|
6
27
|
|
|
7
28
|
Emailed and texted codes at step-up need Passflow server src/v0.114.0 or later, which sends them
|
|
8
29
|
from `POST /auth/upgrade/start` (and `POST /auth/session/upgrade/start` for the hosted session). An
|
|
9
30
|
older server refuses the send; the SDK then drops that factor for the step-up and offers the others.
|
|
10
31
|
From src/v0.115.0 up to src/v0.153.2, a start while the code is live answers with that code again
|
|
11
|
-
and sends nothing, so `resend` reports `resent: false` until that code is spent or expired.
|
|
12
|
-
|
|
32
|
+
and sends nothing, so `resend` reports `resent: false` until that code is spent or expired. From
|
|
33
|
+
src/v0.154.0 on, the server honours `resend: true` for codes and sends a new code.
|
|
13
34
|
|
|
14
35
|
- Added: step-up offers emailed and texted codes (`email_otp`, `sms_otp`). `DEFAULT_UPGRADE_FACTORS`
|
|
15
36
|
is now TOTP, passkey, emailed code, texted code, recovery codes; the server's `available_factors`
|