makeplane/plane · error · AuthenticationException
5060
5060
Error message
USER_DOES_NOT_EXIST
What it means
Raised in EmailProvider.set_user_data (email.py:67) during sign-in (is_signup=False) when no User matches User.objects.filter(email=self.key).first(). It returns code 5060 with payload {email} before any password check, confirming the account does not exist.
Source
Thrown at apps/api/plane/authentication/provider/credentials/email.py:67
super().set_user_data({
"email": self.key,
"user": {
"avatar": "",
"first_name": "",
"last_name": "",
"provider_id": "",
"is_password_autoset": False,
},
})
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},
)
View on GitHub (pinned to 1c8a60f858)
Solutions
- Verify the email spelling and use the same address used at signup.
- If new, complete the sign-up flow first (if ENABLE_EMAIL_PASSWORD allows).
- Check whether the account exists under an OAuth-linked identity and link/use that instead.
Example fix
// before: POST sign-in with unregistered email -> 5060 // after: sign up first, or sign in with the OAuth identity actually registered
Defensive patterns
Strategy: validation
Validate before calling
from plane.db.models import User
def user_exists_for_signin(email: str) -> bool:
return User.objects.filter(email=email).exists() Try / catch
try:
provider.set_user_data()
except AuthenticationException as e:
if e.error_code == 5060:
suggest_signup_or_linked_identities(email=e.payload.get('email'))
else:
raise Prevention
- Offer a unified 'find your account' flow that checks email existence first.
- Link OAuth identities so users sign in with whichever method they registered.
When it happens
Trigger: Sign-in attempt where the email is not registered: the lookup returns None, the warning 'User does not exist' is logged, and AuthenticationException code 5060 is raised. Only the sign-in branch (is_signup=False) hits this.
Common situations: Typo in the email address, user never signed up, user signed up via OAuth/magic-code under a different email, or the account was hard-deleted.
Related errors
AI-assisted analysis of makeplane/plane@1c8a60f858 (2026-08-12).
Data as JSON: /api/errors/a0ae8e6e84be1297.
Report an issue: GitHub.