Email address not validated: send a dedicated error message.

This commit is contained in:
Philippe PITTOLI 2024-07-06 12:39:44 +02:00
parent 3d44c7c6e8
commit e2e77af4fa
2 changed files with 7 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class AuthD::Request
# In case the user hasn't validated his email address,
# authentication shouldn't be possible.
if user.contact.activation_key
return Response::ErrorInvalidCredentials.new
return Response::ErrorEmailAddressNotValidated.new
end
# MIGRATION

View File

@ -102,4 +102,10 @@ class AuthD::Response
end
end
AuthD.responses << ErrorPasswordTooLong
IPC::JSON.message ErrorEmailAddressNotValidated, 36 do
def initialize()
end
end
AuthD.responses << ErrorEmailAddressNotValidated
end