@vunexa/lixa 0.1.6-alpha.1 → 0.1.6-alpha.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 CHANGED
@@ -249,26 +249,26 @@ export interface Session<TRaw = OAuthTokenResponse> {
249
249
  /** Unique session ID generated by Lixa */
250
250
  id?: string;
251
251
 
252
- /** Primary access token or session token */
253
- token: string;
254
-
255
252
  /** Unified user ID across linked accounts */
256
253
  userId?: string;
257
254
 
258
255
  /** Primary user email */
259
256
  email?: string;
260
257
 
261
- /** Current active auth provider */
262
- provider?: string;
263
-
264
- /** Linked SSO provider accounts (AuthN) */
258
+ /** Linked SSO provider accounts (AuthN) - Single Source of Truth */
265
259
  accounts?: Record<string, LinkedAccount>;
266
260
 
267
- /** Connected third-party resource provider tokens (AuthZ) */
261
+ /** Connected third-party resource provider tokens (AuthZ) - Single Source of Truth */
268
262
  resources?: Record<string, ConnectedResource>;
269
263
 
270
- /** Full raw token response from provider */
271
- raw: TRaw;
264
+ /** Optional primary access token or session token */
265
+ token?: string;
266
+
267
+ /** Optional current active auth provider */
268
+ provider?: string;
269
+
270
+ /** Optional raw token response from provider */
271
+ raw?: TRaw;
272
272
  }
273
273
  ```
274
274
 
@@ -310,26 +310,26 @@ export interface Session<TRaw = OAuthTokenResponse> {
310
310
  /** Unique session ID generated by Lixa */
311
311
  id?: string;
312
312
 
313
- /** Primary access token or session token */
314
- token: string;
315
-
316
313
  /** Unified user ID across linked accounts */
317
314
  userId?: string;
318
315
 
319
316
  /** Primary user email */
320
317
  email?: string;
321
318
 
322
- /** Current active auth provider */
323
- provider?: string;
324
-
325
- /** Linked SSO provider accounts (AuthN) */
319
+ /** Linked SSO provider accounts (AuthN) - Single Source of Truth */
326
320
  accounts?: Record<string, LinkedAccount>;
327
321
 
328
- /** Connected third-party resource provider tokens (AuthZ) */
322
+ /** Connected third-party resource provider tokens (AuthZ) - Single Source of Truth */
329
323
  resources?: Record<string, ConnectedResource>;
330
324
 
331
- /** Full raw token response from provider */
332
- raw: TRaw;
325
+ /** Optional primary access token or session token */
326
+ token?: string;
327
+
328
+ /** Optional current active auth provider */
329
+ provider?: string;
330
+
331
+ /** Optional raw token response from provider */
332
+ raw?: TRaw;
333
333
  }
334
334
  ```
335
335
 
@@ -976,25 +976,29 @@ export declare interface Session<TRaw = OAuthTokenResponse> {
976
976
  */
977
977
  id?: string;
978
978
  /**
979
- * The primary access token or session token identifier.
979
+ * Linked identity provider accounts (AuthN) keyed by provider name.
980
+ * Single source of truth for all authenticated user SSO identities.
980
981
  */
981
- token: string;
982
+ accounts?: Record<string, LinkedAccount>;
983
+ /**
984
+ * Connected third-party resource provider tokens (AuthZ) keyed by provider name.
985
+ * Single source of truth for all post-login third-party API permissions.
986
+ */
987
+ resources?: Record<string, ConnectedResource>;
982
988
  /** Unique unified user ID across linked accounts */
983
989
  userId?: string;
984
990
  /** Primary user email */
985
991
  email?: string;
986
- /** Current active auth provider for this session turn */
992
+ /**
993
+ * Optional primary access token or custom session token identifier.
994
+ */
995
+ token?: string;
996
+ /** Optional current active auth provider for this session turn */
987
997
  provider?: string;
988
- /** Linked SSO provider accounts keyed by provider name */
989
- accounts?: Record<string, LinkedAccount>;
990
- /** Connected third-party resource provider tokens keyed by provider name */
991
- resources?: Record<string, ConnectedResource>;
992
998
  /**
993
- * Raw session data.
994
- * Contains the complete OAuth token response and any additional data
995
- * your SessionStrategy adds (user info, database IDs, etc.).
999
+ * Optional raw session token response data from provider.
996
1000
  */
997
- raw: TRaw;
1001
+ raw?: TRaw;
998
1002
  }
999
1003
 
1000
1004
  /**
package/dist/index.d.cts CHANGED
@@ -103,25 +103,29 @@ interface Session<TRaw = OAuthTokenResponse> {
103
103
  */
104
104
  id?: string;
105
105
  /**
106
- * The primary access token or session token identifier.
106
+ * Linked identity provider accounts (AuthN) keyed by provider name.
107
+ * Single source of truth for all authenticated user SSO identities.
107
108
  */
108
- token: string;
109
+ accounts?: Record<string, LinkedAccount>;
110
+ /**
111
+ * Connected third-party resource provider tokens (AuthZ) keyed by provider name.
112
+ * Single source of truth for all post-login third-party API permissions.
113
+ */
114
+ resources?: Record<string, ConnectedResource>;
109
115
  /** Unique unified user ID across linked accounts */
110
116
  userId?: string;
111
117
  /** Primary user email */
112
118
  email?: string;
113
- /** Current active auth provider for this session turn */
119
+ /**
120
+ * Optional primary access token or custom session token identifier.
121
+ */
122
+ token?: string;
123
+ /** Optional current active auth provider for this session turn */
114
124
  provider?: string;
115
- /** Linked SSO provider accounts keyed by provider name */
116
- accounts?: Record<string, LinkedAccount>;
117
- /** Connected third-party resource provider tokens keyed by provider name */
118
- resources?: Record<string, ConnectedResource>;
119
125
  /**
120
- * Raw session data.
121
- * Contains the complete OAuth token response and any additional data
122
- * your SessionStrategy adds (user info, database IDs, etc.).
126
+ * Optional raw session token response data from provider.
123
127
  */
124
- raw: TRaw;
128
+ raw?: TRaw;
125
129
  }
126
130
  /**
127
131
  * Provider metadata passed to session strategy.
@@ -103,25 +103,29 @@ export interface Session<TRaw = OAuthTokenResponse> {
103
103
  */
104
104
  id?: string;
105
105
  /**
106
- * The primary access token or session token identifier.
106
+ * Linked identity provider accounts (AuthN) keyed by provider name.
107
+ * Single source of truth for all authenticated user SSO identities.
107
108
  */
108
- token: string;
109
+ accounts?: Record<string, LinkedAccount>;
110
+ /**
111
+ * Connected third-party resource provider tokens (AuthZ) keyed by provider name.
112
+ * Single source of truth for all post-login third-party API permissions.
113
+ */
114
+ resources?: Record<string, ConnectedResource>;
109
115
  /** Unique unified user ID across linked accounts */
110
116
  userId?: string;
111
117
  /** Primary user email */
112
118
  email?: string;
113
- /** Current active auth provider for this session turn */
119
+ /**
120
+ * Optional primary access token or custom session token identifier.
121
+ */
122
+ token?: string;
123
+ /** Optional current active auth provider for this session turn */
114
124
  provider?: string;
115
- /** Linked SSO provider accounts keyed by provider name */
116
- accounts?: Record<string, LinkedAccount>;
117
- /** Connected third-party resource provider tokens keyed by provider name */
118
- resources?: Record<string, ConnectedResource>;
119
125
  /**
120
- * Raw session data.
121
- * Contains the complete OAuth token response and any additional data
122
- * your SessionStrategy adds (user info, database IDs, etc.).
126
+ * Optional raw session token response data from provider.
123
127
  */
124
- raw: TRaw;
128
+ raw?: TRaw;
125
129
  }
126
130
  /**
127
131
  * Provider metadata passed to session strategy.
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/models/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IAEjB,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IAEpB,4CAA4C;IAC5C,GAAG,EAAE,kBAAkB,CAAC;IAExB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IAEjB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IAEpB,yDAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgFG;IACH,aAAa,CAAC,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpG;AAED;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC5D;;;;;;;OAOG;IACG,aAAa,CAAC,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;CAUzG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunexa/lixa",
3
- "version": "0.1.6-alpha.1",
3
+ "version": "0.1.6-alpha.2",
4
4
  "description": "Lixa is a flexible, provider-agnostic OAuth and OpenID Connect (OIDC) client library that simplifies multi-provider authentication flows. It supports seamless integration with providers like Google and GitHub, offers extensible session management, and enables dynamic provider resolution based on callback URLs.",
5
5
  "keywords": [
6
6
  "oauth",