@auth-gate/core 0.15.0 → 0.15.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/dist/index.cjs CHANGED
@@ -727,11 +727,13 @@ var AuthGateClient = class {
727
727
  /**
728
728
  * Exchange a refresh token for a new JWT.
729
729
  *
730
- * Refresh tokens are single-use — each call returns a new JWT and
731
- * invalidates the previous refresh token (rotation).
730
+ * Refresh tokens are single-use: each call invalidates the token it was
731
+ * given, so callers must store the `refresh_token` it returns or their next
732
+ * refresh fails.
732
733
  *
733
734
  * @param refreshToken - The opaque refresh token.
734
- * @returns A new JWT and its `expires_in` (seconds), or `null` if the refresh token is invalid.
735
+ * @returns A new JWT, its `expires_in` (seconds) and the rotated
736
+ * `refresh_token`, or `null` if the refresh token is invalid.
735
737
  */
736
738
  async refreshToken(refreshToken) {
737
739
  try {
package/dist/index.d.cts CHANGED
@@ -360,14 +360,17 @@ declare class AuthGateClient {
360
360
  /**
361
361
  * Exchange a refresh token for a new JWT.
362
362
  *
363
- * Refresh tokens are single-use — each call returns a new JWT and
364
- * invalidates the previous refresh token (rotation).
363
+ * Refresh tokens are single-use: each call invalidates the token it was
364
+ * given, so callers must store the `refresh_token` it returns or their next
365
+ * refresh fails.
365
366
  *
366
367
  * @param refreshToken - The opaque refresh token.
367
- * @returns A new JWT and its `expires_in` (seconds), or `null` if the refresh token is invalid.
368
+ * @returns A new JWT, its `expires_in` (seconds) and the rotated
369
+ * `refresh_token`, or `null` if the refresh token is invalid.
368
370
  */
369
371
  refreshToken(refreshToken: string): Promise<{
370
372
  token: string;
373
+ refresh_token?: string;
371
374
  expires_in: number;
372
375
  } | null>;
373
376
  /**
package/dist/index.d.ts CHANGED
@@ -360,14 +360,17 @@ declare class AuthGateClient {
360
360
  /**
361
361
  * Exchange a refresh token for a new JWT.
362
362
  *
363
- * Refresh tokens are single-use — each call returns a new JWT and
364
- * invalidates the previous refresh token (rotation).
363
+ * Refresh tokens are single-use: each call invalidates the token it was
364
+ * given, so callers must store the `refresh_token` it returns or their next
365
+ * refresh fails.
365
366
  *
366
367
  * @param refreshToken - The opaque refresh token.
367
- * @returns A new JWT and its `expires_in` (seconds), or `null` if the refresh token is invalid.
368
+ * @returns A new JWT, its `expires_in` (seconds) and the rotated
369
+ * `refresh_token`, or `null` if the refresh token is invalid.
368
370
  */
369
371
  refreshToken(refreshToken: string): Promise<{
370
372
  token: string;
373
+ refresh_token?: string;
371
374
  expires_in: number;
372
375
  } | null>;
373
376
  /**
package/dist/index.mjs CHANGED
@@ -726,11 +726,13 @@ var AuthGateClient = class {
726
726
  /**
727
727
  * Exchange a refresh token for a new JWT.
728
728
  *
729
- * Refresh tokens are single-use — each call returns a new JWT and
730
- * invalidates the previous refresh token (rotation).
729
+ * Refresh tokens are single-use: each call invalidates the token it was
730
+ * given, so callers must store the `refresh_token` it returns or their next
731
+ * refresh fails.
731
732
  *
732
733
  * @param refreshToken - The opaque refresh token.
733
- * @returns A new JWT and its `expires_in` (seconds), or `null` if the refresh token is invalid.
734
+ * @returns A new JWT, its `expires_in` (seconds) and the rotated
735
+ * `refresh_token`, or `null` if the refresh token is invalid.
734
736
  */
735
737
  async refreshToken(refreshToken) {
736
738
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auth-gate/core",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Core client library for AuthGate — the OAuth proxy that handles provider configuration, token exchange, and user normalization so you don't have to.",
5
5
  "type": "module",
6
6
  "exports": {