From 28b78b56ffbb4e3d6b7ec1042012f309fc75d30a Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Fri, 3 Apr 2026 08:49:45 +0530 Subject: [PATCH] fix: fallback to provider ID for email when user email is missing during authentication --- src/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.ts b/src/auth.ts index 6f7f57e..99dac57 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -136,7 +136,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth({ body: JSON.stringify({ provider: account.provider, providerId: account.providerAccountId, - email: user.email, + email: user.email || `${account.providerAccountId}@x.com`, name: user.name, avatar: user.image, role,