diff --git a/src/requests/login.cr b/src/requests/login.cr index f4e2ff5..22125d6 100644 --- a/src/requests/login.cr +++ b/src/requests/login.cr @@ -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 diff --git a/src/responses/errors.cr b/src/responses/errors.cr index dd52e4d..81d34a2 100644 --- a/src/responses/errors.cr +++ b/src/responses/errors.cr @@ -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