fix error messages

This commit is contained in:
Johannes
2023-07-20 15:59:21 +02:00
parent cf953db18f
commit 78ed48adeb

View File

@@ -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({