diff --git a/web/server.py b/web/server.py index a54d80f..e76b939 100644 --- a/web/server.py +++ b/web/server.py @@ -349,7 +349,9 @@ async def bridge_bind_new(mx_id: str): token = secrets.token_urlsafe() app.state.binds[token] = mx_id url = discord.utils.oauth_url( - OAUTH_ID, redirect_uri=OAUTH_REDIRECT_URI, scopes=("identify",) + OAUTH_ID, + redirect_uri=OAUTH_REDIRECT_URI[:-4] + "bridge/bind/callback", + scopes=("identify",) ) + f"&state={token}&prompt=none" return { "status": "pending", @@ -383,7 +385,9 @@ async def bridge_bind_delete(mx_id: str, code: str = None, state: str = None): token = secrets.token_urlsafe() app.state.binds[token] = mx_id url = discord.utils.oauth_url( - OAUTH_ID, redirect_uri=OAUTH_REDIRECT_URI, scopes=("identify",) + OAUTH_ID, + redirect_uri=OAUTH_REDIRECT_URI[:-4] + "bridge/bind/callback", + scopes=("identify",) ) + f"&state={token}&prompt=none" return JSONResponse({"status": "pending", "url": url}) else: