Skip to content

Commit a8244f4

Browse files
authored
fix(auth): New bug found
1 parent 6d34650 commit a8244f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/frontend/src/pages/api/auth/[...nextauth].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const nextAuthConfig: NextAuthOptions = {
8181
return token;
8282
}
8383
// Return previous token if the access token has not expired yet
84-
if (Date.now() < token.accessTokenExpired) return token;
84+
if (Date.now() < token.accessTokenExpired || token.accessTokenExpired == null) return token;
8585

8686
// Access token has expired, try to update it
8787
return refreshAccessToken(token);

0 commit comments

Comments
 (0)