Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Unable to log in with the authentication information provided #461

Open
labike opened this issue Dec 5, 2018 · 0 comments
Open

Unable to log in with the authentication information provided #461

labike opened this issue Dec 5, 2018 · 0 comments

Comments

@labike
Copy link

labike commented Dec 5, 2018

when i post data, i always get this msg: Unable to log in with the authentication information provided

class CustomBackend(ModelBackend):
    def authenticate(self, username=None, password=None, **kwargs):
        try:
            user = User.objects.get(Q(username=username)|Q(mobile=username))
            if user.check_password(password):
                return user
        except Exception as e:
            return None

xshot-0005

i'm follow offical website config, but don't know why not post data to API?

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

No branches or pull requests

1 participant