@omelhorsite/sdk 0.12.1 → 0.12.2
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 +1 -1
- package/dist/types/auth/tokens.d.ts +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ const rows = await oms.http.get<{ id: string }[]>("/some/path");
|
|
|
100
100
|
|
|
101
101
|
## Namespaces
|
|
102
102
|
|
|
103
|
-
- `oms.auth` - OAuth: device grant, refresh, revoke, `whoami`.
|
|
103
|
+
- `oms.auth` - OAuth: device grant, refresh, revoke, `whoami`. `decodeIdToken(idToken).sub` is the stable identifier; `email` is a contact and `email_verified` is often `false`, so never find or merge users by email.
|
|
104
104
|
- `oms.sessions`, `oms.passkeys` - sign-in, sign-up, OTP, passkeys.
|
|
105
105
|
- `oms.account` - the signed-in user, profile, sessions, usage. `oms.account.notificationPreferences` decides, per notification kind, whether it shows in the inbox and whether it is emailed; the security kinds always email, unless the master switch is off.
|
|
106
106
|
- `oms.storage` - files and folders: upload, download, share.
|
|
@@ -55,8 +55,22 @@ export interface IdentityClaims {
|
|
|
55
55
|
readonly iat?: number;
|
|
56
56
|
/** Present only when the `profile` scope was granted. Mutable, display only. */
|
|
57
57
|
readonly preferred_username?: string;
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Present only when the `email` scope was granted. Mutable, display only.
|
|
60
|
+
*
|
|
61
|
+
* Never look a user up by this. An account can be created with any address
|
|
62
|
+
* and used without proving it, so the value may belong to someone else;
|
|
63
|
+
* matching on it lets whoever registers with a victim's address into the
|
|
64
|
+
* victim's account on your side. Key on `iss` + `sub`.
|
|
65
|
+
*/
|
|
59
66
|
readonly email?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the server holds proof that `email` belongs to the user. Present
|
|
69
|
+
* whenever `email` is, and often `false`. `true` still only means the
|
|
70
|
+
* server checked it once; confirm it yourself before attaching the address
|
|
71
|
+
* to an account that already existed.
|
|
72
|
+
*/
|
|
73
|
+
readonly email_verified?: boolean;
|
|
60
74
|
readonly [claim: string]: unknown;
|
|
61
75
|
}
|
|
62
76
|
/**
|
package/package.json
CHANGED