Skip to content

Commit 0389a33

Browse files
committed
🩹 Fix aiohttp wants BasicAuth tuple
1 parent 4f02625 commit 0389a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discordoauth2/async_oauth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ async def client_credentails_grant(self, scope: list[str]) -> AsyncAccessToken:
377377
async with session.post(
378378
"https://discord.com/api/v10/oauth2/token",
379379
data={"grant_type": "client_credentials", "scope": " ".join(scope)},
380-
auth=(self.id, self.__secret),
380+
auth=aiohttp.BasicAuth(str(self.id), self.__secret),
381381
) as response:
382382
if response.ok:
383383
return AsyncAccessToken(await response.json(), self)
@@ -403,7 +403,7 @@ async def revoke_token(self, token: str, token_type: str = None):
403403
async with session.post(
404404
"https://discord.com/api/oauth2/token/revoke",
405405
data={"token": token, "token_type_hint": token_type},
406-
auth=(self.id, self.__secret),
406+
auth=aiohttp.BasicAuth(str(self.id), self.__secret),
407407
) as response:
408408
if response.ok:
409409
return

0 commit comments

Comments
 (0)