fix: fallback to provider ID for email when user email is missing during authentication

This commit is contained in:
pradeepkumar
2026-04-03 08:49:45 +05:30
parent a5f8f33d68
commit 28b78b56ff

View File

@@ -136,7 +136,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
body: JSON.stringify({ body: JSON.stringify({
provider: account.provider, provider: account.provider,
providerId: account.providerAccountId, providerId: account.providerAccountId,
email: user.email, email: user.email || `${account.providerAccountId}@x.com`,
name: user.name, name: user.name,
avatar: user.image, avatar: user.image,
role, role,