From 01659cd5f467e8b051ddb71f7429f57d1a60291b Mon Sep 17 00:00:00 2001
From: Paul Asjes
Date: Mon, 4 Nov 2024 16:39:40 +0100
Subject: [PATCH 1/2] Update logging strategy
---
src/session.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/session.ts b/src/session.ts
index 37f1b13..c4e4641 100644
--- a/src/session.ts
+++ b/src/session.ts
@@ -120,7 +120,7 @@ async function updateSession(
}
try {
- if (debug) console.log('Session invalid. Attempting refresh', session.refreshToken);
+ if (debug) console.log(`Session invalid. Refreshing access token that ends in ${session.accessToken.slice(-10)}`);
const { org_id: organizationId } = decodeJwt(session.accessToken);
@@ -131,7 +131,7 @@ async function updateSession(
organizationId,
});
- if (debug) console.log('Refresh successful:', refreshToken);
+ if (debug) console.log(`Refresh successful. New access token ends in ${accessToken.slice(-10)}`);
// Encrypt session with new access and refresh tokens
const encryptedSession = await encryptSession({
From eb972a81bfef789e0e55f4ed4ab6ee74ea169969 Mon Sep 17 00:00:00 2001
From: Paul Asjes
Date: Mon, 4 Nov 2024 16:46:04 +0100
Subject: [PATCH 2/2] Version bump
---
package.json | 2 +-
src/workos.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index c845c48..ec0bf5c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@workos-inc/authkit-nextjs",
- "version": "0.13.1",
+ "version": "0.13.2",
"description": "Authentication and session helpers for using WorkOS & AuthKit with Next.js",
"sideEffects": false,
"type": "module",
diff --git a/src/workos.ts b/src/workos.ts
index d689f6d..6c0d1d7 100644
--- a/src/workos.ts
+++ b/src/workos.ts
@@ -1,7 +1,7 @@
import { WorkOS } from '@workos-inc/node';
import { WORKOS_API_HOSTNAME, WORKOS_API_KEY, WORKOS_API_HTTPS, WORKOS_API_PORT } from './env-variables.js';
-export const VERSION = '0.13.1';
+export const VERSION = '0.13.2';
const options = {
apiHostname: WORKOS_API_HOSTNAME,