Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Please, enter valid credentials." #159

Open
gneyal opened this issue Sep 8, 2022 · 0 comments
Open

"Please, enter valid credentials." #159

gneyal opened this issue Sep 8, 2022 · 0 comments

Comments

@gneyal
Copy link

gneyal commented Sep 8, 2022

After requesting:
mutation {
tokenAuth(email: "new_user", password: "supersecretpassword") {
success,
errors,
unarchiving,
token,
refreshToken,
unarchiving,
user {
id,
username,
}
}
}

I'm getting:
{
"data": {
"tokenAuth": {
"success": false,
"errors": {
"nonFieldErrors": [
{
"message": "Please, enter valid credentials.",
"code": "invalid_credentials"
}
]
},
"token": null,
"refreshToken": null,
"user": null
}
}
}

When I log in to the admin with these credentials everything works fine.

Help?

I have a custom user class that looks like that:
class User(AbstractUser):
objects = UserManager()
REQUIRED_FIELDS = []
USERNAME_FIELD = "email"
username = None
email = models.EmailField("email address", blank=False, null=False, unique=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant