{"record":{"id":"32f067b00c583e23","repo":"makeplane/plane","slug":"5035-5065","errorCode":"5035|5065","errorMessage":"AUTHENTICATION_FAILED_SIGN_UP|AUTHENTICATION_FAILED_SIGN_IN","messagePattern":"AUTHENTICATION_FAILED_SIGN_UP\\|AUTHENTICATION_FAILED_SIGN_IN","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"apps/api/plane/authentication/provider/credentials/email.py","lineNumber":76,"sourceCode":"                },\n            })\n            return\n        else:\n            user = User.objects.filter(email=self.key).first()\n\n            # User does not exists\n            if not user:\n                self.logger.warning(\"User does not exist\")\n                raise AuthenticationException(\n                    error_message=\"USER_DOES_NOT_EXIST\",\n                    error_code=AUTHENTICATION_ERROR_CODES[\"USER_DOES_NOT_EXIST\"],\n                    payload={\"email\": self.key},\n                )\n\n            # Check user password\n            if not user.check_password(self.code):\n                self.logger.warning(\"Authentication failed - invalid credentials\")\n                raise AuthenticationException(\n                    error_message=(\n                        \"AUTHENTICATION_FAILED_SIGN_UP\" if self.is_signup else \"AUTHENTICATION_FAILED_SIGN_IN\"\n                    ),\n                    error_code=AUTHENTICATION_ERROR_CODES[\n                        (\"AUTHENTICATION_FAILED_SIGN_UP\" if self.is_signup else \"AUTHENTICATION_FAILED_SIGN_IN\")\n                    ],\n                    payload={\"email\": self.key},\n                )\n\n            super().set_user_data({\n                \"email\": self.key,\n                \"user\": {\n                    \"avatar\": \"\",\n                    \"first_name\": \"\",\n                    \"last_name\": \"\",\n                    \"provider_id\": \"\",\n                    \"is_password_autoset\": False,\n                },","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/makeplane/plane/blob/1c8a60f858d8472aa56e29994ec1c7926da2c6ce/apps/api/plane/authentication/provider/credentials/email.py#L58-L94","documentation":"Raised in EmailProvider.set_user_data (email.py:76) when the user exists but user.check_password(self.code) returns False. The message/code are selected by is_signup: AUTHENTICATION_FAILED_SIGN_UP (5035) if signup, else AUTHENTICATION_FAILED_SIGN_IN (5065). Payload includes {email}. Note: the signup branch returns earlier on duplicate, so in practice 5035 is rare here and 5065 dominates.","triggerScenarios":"Sign-in (or the signup fallback) with a valid email but wrong password. check_password fails, the warning 'Authentication failed - invalid credentials' is logged, and AuthenticationException is raised with the sign-up or sign-in variant depending on the is_signup flag.","commonSituations":"Forgotten password, wrong caps-lock, stale password from before a reset, password manager autofilled the wrong credential, or the account uses an auto-set password from magic-code/OAuth and the user never set an email password.","solutions":["Use the password-reset flow to set a new password.","If the account was created via magic-code/OAuth (is_password_autoset), set a password through the account settings or sign in via the original method.","Confirm caps-lock and the correct autofill entry."],"exampleFix":"// before: sign-in with wrong password -> 5065\n// after: trigger password reset, then sign in with the new password","handlingStrategy":"try-catch","validationCode":"from plane.db.models import User\n\ndef password_valid(email: str, password: str) -> bool:\n    u = User.objects.filter(email=email).first()\n    return bool(u) and u.check_password(password)","typeGuard":null,"tryCatchPattern":"try:\n    provider.set_user_data()\nexcept AuthenticationException as e:\n    if e.error_code in (5035, 5065):\n        offer_password_reset(email=e.payload.get('email'))\n    else:\n        raise","preventionTips":["Offer password reset from the sign-in error screen.","Detect is_password_autoset accounts and direct them to set a password or use their original auth method."],"tags":["authentication","signin","email-password","invalid-credentials","password"],"backgroundTag":null,"analyzedSha":"1c8a60f858d8472aa56e29994ec1c7926da2c6ce","analyzedAt":"2026-08-12T14:44:31.636Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}