Skip to content

Commit

Permalink
Pass request to django's authenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
drozdowsky committed Aug 23, 2019
1 parent ad88ffb commit 2b4125b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/14.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pass `request` to `django.contrib.auth.authenticate`.
2 changes: 1 addition & 1 deletion src/rest_framework_jwt/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def validate(self, data):
'password': data.get('password')
}

user = authenticate(**credentials)
user = authenticate(self.context['request'], **credentials)

if not user:
msg = _('Unable to log in with provided credentials.')
Expand Down

0 comments on commit 2b4125b

Please sign in to comment.