Skip to content

Scheduling infrastructure for absolutely everyone.

fix: update should be based on email only (#9977)

Alex van Andelafd41475c9a9
diff --git a/packages/features/auth/lib/next-auth-options.ts b/packages/features/auth/lib/next-auth-options.ts
index 122bfab85c2..9d06eb62e5e 100644
--- a/packages/features/auth/lib/next-auth-options.ts
+++ b/packages/features/auth/lib/next-auth-options.ts
@@ -616,10 +616,7 @@ export const AUTH_OPTIONS: AuthOptions = {
) {
await prisma.user.update({
where: {
- email_username: {
- email: existingUserWithEmail.email,
- username: existingUserWithEmail.username!,
- },
+ email: existingUserWithEmail.email,
},
data: {
// update the email to the IdP email