Improve errors when email is already in use (#4014)

Fixes #1485

Also fixes an issue where email_verified was being set to true regardless of whether the oauth provider provides an email (thus indicating that a null email is verified)
This commit is contained in:
Emma Alexia
2025-07-17 21:59:48 -04:00
committed by GitHub
parent 013ba4d86d
commit 0c3e23db96
2 changed files with 20 additions and 6 deletions

View File

@@ -43,7 +43,9 @@ pub enum AuthenticationError {
InvalidAuthMethod,
#[error("GitHub Token from incorrect Client ID")]
InvalidClientId,
#[error("User email/account is already registered on Modrinth")]
#[error(
"User email is already registered on Modrinth. Try 'Forgot password' to access your account."
)]
DuplicateUser,
#[error("Invalid state sent, you probably need to get a new websocket")]
SocketError,