Skip to content

Commit

Permalink
Try handling lack of name in token section
Browse files Browse the repository at this point in the history
  • Loading branch information
jchaselubitz committed Dec 13, 2023
1 parent fd78308 commit 84f63a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pages/api/auth/next-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const options: AuthOptions = {
}) {
if (user) {
token.id = user.id;
token.name = user.name || '';
const now = Math.floor(Date.now() / 1000);
const expiresIn = 60 * 60 * 160; // 1 hour
token.exp = now + expiresIn;
Expand Down

0 comments on commit 84f63a1

Please sign in to comment.