Skip to content

Commit 32d5bcd

Browse files
author
Paul Asjes
authored
Update logging strategy (#27)
1 parent 2c88870 commit 32d5bcd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@workos-inc/authkit-remix",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Authentication and session helpers for using WorkOS & AuthKit with Remix",
55
"sideEffects": false,
66
"type": "commonjs",

src/session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ async function updateSession(request: Request, debug: boolean) {
2727
}
2828

2929
try {
30-
if (debug) console.log('Session invalid. Attempting refresh', session.refreshToken);
30+
if (debug) console.log(`Session invalid. Refreshing access token that ends in ${session.accessToken.slice(-10)}`);
3131

3232
// If the session is invalid (i.e. the access token has expired) attempt to re-authenticate with the refresh token
3333
const { accessToken, refreshToken } = await workos.userManagement.authenticateWithRefreshToken({
3434
clientId: WORKOS_CLIENT_ID,
3535
refreshToken: session.refreshToken,
3636
});
3737

38-
if (debug) console.log('Refresh successful:', refreshToken);
38+
if (debug) console.log(`Refresh successful. New access token ends in ${accessToken.slice(-10)}`);
3939

4040
const newSession = {
4141
accessToken,

src/workos.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WorkOS } from '@workos-inc/node';
22
import { WORKOS_API_HOSTNAME, WORKOS_API_HTTPS, WORKOS_API_KEY, WORKOS_API_PORT } from './env-variables.js';
33

4-
const VERSION = '0.4.0';
4+
const VERSION = '0.4.1';
55

66
const options = {
77
apiHostname: WORKOS_API_HOSTNAME,

0 commit comments

Comments
 (0)