Fix 404 when Email exists in GitHub Login

Fix 404 when Email exists in GitHub Login
This commit is contained in:
Johannes
2023-07-20 09:11:55 -05:00
committed by GitHub
@@ -240,7 +240,7 @@ export const authOptions: NextAuthOptions = {
});
return true;
}
return "/auth/error?error=email-conflict";
return "/auth/login?error=Looks%20like%20you%20updated%20your%20email%20somewhere%20else.%0AA%20user%20with%20this%20new%20email%20exists%20already.";
}
// There is no existing account for this identity provider / account id
@@ -251,7 +251,7 @@ export const authOptions: NextAuthOptions = {
});
if (existingUserWithEmail) {
return "/auth/error?error=use-email-login";
return "/auth/login?error=A%20user%20with%20this%20email%20exists%20already.";
}
await prisma.user.create({