diff options
author | 2021-02-21 01:44:01 +0300 | |
---|---|---|
committer | 2021-02-21 01:44:01 +0300 | |
commit | f90d0c7fddb81215b907808b8365f63f42344652 (patch) | |
tree | 24cdb764870e97008c821cc84f7ab8a67d394b51 /backend/discord.py | |
parent | Centralizes Admin Authentication (diff) |
Dynamically Selects OAuth Redirect URI
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend/discord.py')
-rw-r--r-- | backend/discord.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/discord.py b/backend/discord.py index 9cdd2c4..8cb602c 100644 --- a/backend/discord.py +++ b/backend/discord.py @@ -2,18 +2,18 @@ import httpx from backend.constants import ( - OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_REDIRECT_URI + OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET ) API_BASE_URL = "https://discord.com/api/v8" -async def fetch_bearer_token(code: str, *, refresh: bool) -> dict: +async def fetch_bearer_token(code: str, redirect: str, *, refresh: bool) -> dict: async with httpx.AsyncClient() as client: data = { "client_id": OAUTH2_CLIENT_ID, "client_secret": OAUTH2_CLIENT_SECRET, - "redirect_uri": OAUTH2_REDIRECT_URI + "redirect_uri": f"{redirect}/callback" } if refresh: |