diff --git a/apiserver/plane/authentication/adapter/error.py b/apiserver/plane/authentication/adapter/error.py index 457a67f4f..7b12db945 100644 --- a/apiserver/plane/authentication/adapter/error.py +++ b/apiserver/plane/authentication/adapter/error.py @@ -17,6 +17,7 @@ AUTHENTICATION_ERROR_CODES = { "INVALID_EMAIL_SIGN_UP": 5045, "INVALID_EMAIL_MAGIC_SIGN_UP": 5050, "MAGIC_SIGN_UP_EMAIL_CODE_REQUIRED": 5055, + "EMAIL_PASSWORD_AUTHENTICATION_DISABLED": 5056, # Sign In "USER_DOES_NOT_EXIST": 5060, "AUTHENTICATION_FAILED_SIGN_IN": 5065, diff --git a/apiserver/plane/authentication/provider/credentials/email.py b/apiserver/plane/authentication/provider/credentials/email.py index 7e4e619d8..4c7764128 100644 --- a/apiserver/plane/authentication/provider/credentials/email.py +++ b/apiserver/plane/authentication/provider/credentials/email.py @@ -41,8 +41,10 @@ class EmailProvider(CredentialAdapter): if ENABLE_EMAIL_PASSWORD == "0": raise AuthenticationException( - error_code=AUTHENTICATION_ERROR_CODES["ENABLE_EMAIL_PASSWORD"], - error_message="ENABLE_EMAIL_PASSWORD", + error_code=AUTHENTICATION_ERROR_CODES[ + "EMAIL_PASSWORD_AUTHENTICATION_DISABLED" + ], + error_message="EMAIL_PASSWORD_AUTHENTICATION_DISABLED", ) def set_user_data(self):