Open willdady opened 7 years ago
I have a custom User model where USERNAME_FIELD = 'email' however I'd like to be able to submit login credentials as:
USERNAME_FIELD = 'email'
{ username: 'foo@example.com', password: 'mypassword' }
Not
{ email: 'foo@example.com', password: 'mypassword' }
I'm wanting to make the request compliant with OAuth2 Access Token Request.
Currently this is not possible as JSONWebTokenSerializer creates it's username field by inspecting UserModel.USERNAME_FIELD. Having a setting for mapping payload username to model username would be useful.
JSONWebTokenSerializer
UserModel.USERNAME_FIELD
Same problem :(
I have a custom User model where
USERNAME_FIELD = 'email'
however I'd like to be able to submit login credentials as:Not
I'm wanting to make the request compliant with OAuth2 Access Token Request.
Currently this is not possible as
JSONWebTokenSerializer
creates it's username field by inspectingUserModel.USERNAME_FIELD
. Having a setting for mapping payload username to model username would be useful.