Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fdamken authored Nov 8, 2022
1 parent cb1b446 commit 7aaf326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allauth_d120_provider/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class D120Adapter(OAuth2Adapter):
authorize_url = provider_base(endpoint='auth')

def complete_login(self, request, app, token, **kwargs):
headers = {'Authorization': 'Bearer {0}'.format(token.token)}
headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer {0}'.format(str(token))}
resp = requests.get(self.profile_url, headers=headers)
extra_data = resp.json()
return self.get_provider().sociallogin_from_response(request, extra_data)
Expand Down

0 comments on commit 7aaf326

Please sign in to comment.