@kubun/credential-types 0.17.1 → 0.17.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.
Files changed (2) hide show
  1. package/lib/index.d.ts +12 -0
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ export type ProviderAccount = {
2
+ /** OpenID issuer, e.g. `https://accounts.google.com`. */
3
+ iss: string;
4
+ /** Stable, opaque provider subject id. Never projected to the graph. */
5
+ sub: string;
6
+ };
1
7
  export type Credential = {
2
8
  accessToken: string;
3
9
  refreshToken?: string;
@@ -5,6 +11,12 @@ export type Credential = {
5
11
  scopes: Array<string>;
6
12
  accountLabel?: string;
7
13
  metadata?: Record<string, unknown>;
14
+ /**
15
+ * Verified stable provider-account identity captured at OAuth completion.
16
+ * Lives only in the encrypted credential body; the graph sees only a derived
17
+ * non-reversible key. Preserved verbatim across token refresh.
18
+ */
19
+ providerAccount?: ProviderAccount;
8
20
  };
9
21
  export type CredentialProvider = {
10
22
  get(providerName: string, ownerDID: string): Promise<Credential | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/credential-types",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "keywords": [],
5
5
  "license": "see LICENSE.md",
6
6
  "sideEffects": false,