authlib / example-oauth2-server

Example for OAuth 2 Server for Authlib.
https://authlib.org/
685 stars 285 forks source link

PasswordGrant: syntax error on invalid username fixed #54

Closed husudosu closed 5 years ago

husudosu commented 5 years ago

When using PasswordGrant and passing bad username to request (via CURL), the server gets syntax error: AttributeError: 'NoneType' object has no attribute 'check_password'

I fixed it. Result of request now: {"error": "invalid_grant", "error_description": "Invalid \"username\" or \"password\" in request."}

lepture commented 5 years ago

Thanks