{"record":{"id":"e7c4bf6a10de939b","repo":"makeplane/plane","slug":"5056","errorCode":"5056","errorMessage":"EMAIL_PASSWORD_AUTHENTICATION_DISABLED","messagePattern":"EMAIL_PASSWORD_AUTHENTICATION_DISABLED","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"apps/api/plane/authentication/provider/credentials/email.py","lineNumber":35,"sourceCode":"\nclass EmailProvider(CredentialAdapter):\n    provider = \"email\"\n\n    def __init__(self, request, key=None, code=None, is_signup=False, callback=None):\n        super().__init__(request=request, provider=self.provider, callback=callback)\n        self.key = key\n        self.code = code\n        self.is_signup = is_signup\n\n        (ENABLE_EMAIL_PASSWORD,) = get_configuration_value([\n            {\n                \"key\": \"ENABLE_EMAIL_PASSWORD\",\n                \"default\": os.environ.get(\"ENABLE_EMAIL_PASSWORD\"),\n            }\n        ])\n\n        if ENABLE_EMAIL_PASSWORD == \"0\":\n            raise AuthenticationException(\n                error_code=AUTHENTICATION_ERROR_CODES[\"EMAIL_PASSWORD_AUTHENTICATION_DISABLED\"],\n                error_message=\"EMAIL_PASSWORD_AUTHENTICATION_DISABLED\",\n            )\n\n    def set_user_data(self):\n        if self.is_signup:\n            # Check if the user already exists\n            if User.objects.filter(email=self.key).exists():\n                self.logger.warning(\"User already exists\")\n                raise AuthenticationException(\n                    error_message=\"USER_ALREADY_EXIST\",\n                    error_code=AUTHENTICATION_ERROR_CODES[\"USER_ALREADY_EXIST\"],\n                )\n\n            super().set_user_data({\n                \"email\": self.key,\n                \"user\": {\n                    \"avatar\": \"\",","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/makeplane/plane/blob/1c8a60f858d8472aa56e29994ec1c7926da2c6ce/apps/api/plane/authentication/provider/credentials/email.py#L17-L53","documentation":"Raised in EmailProvider.__init__ (email.py:35) when the ENABLE_EMAIL_PASSWORD configuration value equals \"0\". The value is read from instance configuration, falling back to the ENABLE_EMAIL_PASSWORD env var. This gate disables the entire email/password credential provider before any credential check runs.","triggerScenarios":"Constructing the EmailProvider (sign-in or sign-up) reads ENABLE_EMAIL_PASSWORD via get_configuration_value; if it resolves to the string \"0\", AuthenticationException code 5056 is raised immediately. Triggered by POSTing to the email/password sign-in or sign-up endpoints while the feature is disabled.","commonSituations":"Instance configured for SSO-only authentication (EMAIL_PASSWORD disabled), an operator toggled the feature off, or the env var was set to \"0\" during a security lockdown. Callers still hitting the legacy email/password endpoint see this.","solutions":["Set ENABLE_EMAIL_PASSWORD=1 (or remove the \"0\" override) in instance config/env if email+password login is intended.","If SSO-only is intentional, update the client to use the configured OAuth/magic-code flow instead of email+password.","After changing the value, ensure it is persisted in the instance configuration store, not only the env, so it survives restarts."],"exampleFix":"# before: ENABLE_EMAIL_PASSWORD=0 -> any email/password call -> 5056\n# ENABLE_EMAIL_PASSWORD=1\n# after: email/password provider constructs normally","handlingStrategy":"validation","validationCode":"from plane.license.utils.instance_value import get_configuration_value\nimport os\n\ndef email_password_enabled() -> bool:\n    (val,) = get_configuration_value([{'key': 'ENABLE_EMAIL_PASSWORD', 'default': os.environ.get('ENABLE_EMAIL_PASSWORD')}])\n    return val != '0'","typeGuard":null,"tryCatchPattern":"try:\n    EmailProvider(request, key=email, code=pw, is_signup=is_signup)\nexcept AuthenticationException as e:\n    if e.error_code == 5056:\n        offer_alternative_auth_methods()\n    else:\n        raise","preventionTips":["Gate the UI's email/password option on the live ENABLE_EMAIL_PASSWORD value.","Persist feature flags in instance config, not env alone."],"tags":["authentication","email-password","configuration","feature-flag","env"],"backgroundTag":null,"analyzedSha":"1c8a60f858d8472aa56e29994ec1c7926da2c6ce","analyzedAt":"2026-08-12T14:44:31.636Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}