🐛 Update name in session (#1559)

This commit is contained in:
Luke Vella 2025-02-12 13:04:47 +07:00 committed by GitHub
parent 4b26dc50b3
commit 8519631c96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,6 +145,7 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
id: userId,
},
select: {
name: true,
email: true,
locale: true,
timeFormat: true,
@ -154,6 +155,7 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
});
if (user) {
token.name = user.name;
token.email = user.email;
token.locale = user.locale;
token.timeFormat = user.timeFormat;