From 6addc383422d2b5a74de2893c5c6c65f85c948eb Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 3 Feb 2022 05:46:09 +0300 Subject: [PATCH] oauth callback url fix --- auth/oauth.py | 2 +- settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/oauth.py b/auth/oauth.py index 7c45ccc5..90903583 100644 --- a/auth/oauth.py +++ b/auth/oauth.py @@ -83,5 +83,5 @@ async def oauth_authorize(request): } user = Identity.identity_oauth(user_input) token = await Authorize.authorize(user, device="pc") - redirect_uri = "%s/%s" % (OAUTH_CALLBACK_URL, quote_plus(token)) + redirect_uri = "%s%s" % (OAUTH_CALLBACK_URL, quote_plus(token)) return RedirectResponse(url = redirect_uri) diff --git a/settings.py b/settings.py index 3088a24f..91261d92 100644 --- a/settings.py +++ b/settings.py @@ -4,7 +4,7 @@ from os import environ PORT = 8080 BACKEND_URL = environ.get("BACKEND_URL") or "https://localhost:8080" -OAUTH_CALLBACK_URL = environ.get("OAUTH_CALLBACK_URL") or "https://localhost:8080/authorized" +OAUTH_CALLBACK_URL = environ.get("OAUTH_CALLBACK_URL") or "https://localhost:8080/auth/key-" RESET_PWD_URL = environ.get("RESET_PWD_URL") or "https://localhost:8080/reset_pwd" DB_URL = environ.get("DATABASE_URL") or environ.get("DB_URL") or "sqlite:///db.sqlite3"