Skip to content

Commit

Permalink
Update logging strategy (#128)
Browse files Browse the repository at this point in the history
* Update logging strategy

* Version bump
  • Loading branch information
PaulAsjes authored Nov 4, 2024
1 parent 1468ef9 commit 15a3326
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccessToken>(session.accessToken);

Expand All @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/workos.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 15a3326

Please sign in to comment.