Closed PunkFleet closed 7 months ago
@Birddle is the Model username field value the email?
The default validator uses the Model field username if am correct as seen here.
class OAuth2Validator(RequestValidator):
...
def validate_user(self, username, password, client, request, *args, **kwargs):
"""
Check username and password correspond to a valid and active User
"""
# Passing the optional HttpRequest adds compatibility for backends
# which depend on its presence. Create one with attributes likely
# to be used.
http_request = HttpRequest()
http_request.path = request.uri
http_request.method = request.http_method
getattr(http_request, request.http_method).update(dict(request.decoded_body))
http_request.META = request.headers
u = authenticate(http_request, username=username, password=password)
if u is not None and u.is_active:
request.user = u
return True
return False
I following this:https://github.com/jazzband/django-oauth-toolkit/blob/master/docs/getting_started.rst I have a very confusing problem. I am able to log in through a
python manage.py createsuper
created superuser, but not through a user created from the dashboard, even though the superuser option is checked. and i will gotAm I overlooking something?