diff --git a/allauth_d120_provider/views.py b/allauth_d120_provider/views.py index 41d3564..793e80a 100644 --- a/allauth_d120_provider/views.py +++ b/allauth_d120_provider/views.py @@ -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)