makeplane/plane · error · AuthenticationException
5035|5065
5035|5065
Error message
AUTHENTICATION_FAILED_SIGN_UP|AUTHENTICATION_FAILED_SIGN_IN
What it means
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.
Source
Thrown at apps/api/plane/authentication/provider/credentials/email.py:76
},
})
return
else:
user = User.objects.filter(email=self.key).first()
# User does not exists
if not user:
self.logger.warning("User does not exist")
raise AuthenticationException(
error_message="USER_DOES_NOT_EXIST",
error_code=AUTHENTICATION_ERROR_CODES["USER_DOES_NOT_EXIST"],
payload={"email": self.key},
)
# Check user password
if not user.check_password(self.code):
self.logger.warning("Authentication failed - invalid credentials")
raise AuthenticationException(
error_message=(
"AUTHENTICATION_FAILED_SIGN_UP" if self.is_signup else "AUTHENTICATION_FAILED_SIGN_IN"
),
error_code=AUTHENTICATION_ERROR_CODES[
("AUTHENTICATION_FAILED_SIGN_UP" if self.is_signup else "AUTHENTICATION_FAILED_SIGN_IN")
],
payload={"email": self.key},
)
super().set_user_data({
"email": self.key,
"user": {
"avatar": "",
"first_name": "",
"last_name": "",
"provider_id": "",
"is_password_autoset": False,
},View on GitHub (pinned to 1c8a60f858)
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.
Example fix
// before: sign-in with wrong password -> 5065 // after: trigger password reset, then sign in with the new password
Defensive patterns
Strategy: try-catch
Validate before calling
from plane.db.models import User
def password_valid(email: str, password: str) -> bool:
u = User.objects.filter(email=email).first()
return bool(u) and u.check_password(password) Try / catch
try:
provider.set_user_data()
except AuthenticationException as e:
if e.error_code in (5035, 5065):
offer_password_reset(email=e.payload.get('email'))
else:
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
AI-assisted analysis of makeplane/plane@1c8a60f858 (2026-08-12).
Data as JSON: /api/errors/32f067b00c583e23.
Report an issue: GitHub.