Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena committed Oct 17, 2024
1 parent d1ef6fd commit c33be83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/app/api/auth/[...nextauth]/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export const authOptions: AuthOptions = {

const sessionToken = session.sessionToken ?? token;

if (sessionToken && decoded.iat) {
if (sessionToken) {
const now = new Date().getTime();
const exp = decoded.iat * 1000 + SESSION_MAX_AGE * 1000;
const exp = decoded.iat ? decoded.iat * 1000 + SESSION_MAX_AGE * 1000 : 0;

if (now < exp) {
return {
Expand Down

0 comments on commit c33be83

Please sign in to comment.