fixes prefill adding name in session and jwt (#2167)
parent
e21813ba96
commit
e94594d0b1
|
@ -181,6 +181,7 @@ export default NextAuth({
|
|||
if (account && account.type === "credentials") {
|
||||
return {
|
||||
id: user.id,
|
||||
name: user.name,
|
||||
username: user.username,
|
||||
email: user.email,
|
||||
};
|
||||
|
@ -213,6 +214,7 @@ export default NextAuth({
|
|||
|
||||
return {
|
||||
id: existingUser.id,
|
||||
name: existingUser.name,
|
||||
username: existingUser.username,
|
||||
email: existingUser.email,
|
||||
};
|
||||
|
@ -226,6 +228,7 @@ export default NextAuth({
|
|||
user: {
|
||||
...session.user,
|
||||
id: token.id as number,
|
||||
name: token.name,
|
||||
username: token.username as string,
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue