Skip to content

Commit f03ff4d

Browse files
behehpennersr
authored and
pennersr
committed
fix(battlenet): userinfo authentication
1 parent ecfa8c0 commit f03ff4d

File tree

1 file changed

+6
-2
lines changed
  • allauth/socialaccount/providers/battlenet

1 file changed

+6
-2
lines changed

allauth/socialaccount/providers/battlenet/views.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ def profile_url(self):
129129
return self.battlenet_base_url + "/userinfo"
130130

131131
def complete_login(self, request, app, token, **kwargs):
132-
params = {"access_token": token.token}
133132
response = (
134-
get_adapter().get_requests_session().get(self.profile_url, params=params)
133+
get_adapter()
134+
.get_requests_session()
135+
.get(
136+
self.profile_url,
137+
headers={"authorization": "Bearer %s" % (token.token)},
138+
)
135139
)
136140
data = _check_errors(response)
137141

0 commit comments

Comments
 (0)