oauth callback url fix

This commit is contained in:
Tony 2022-02-03 05:46:09 +03:00
parent 92595e567c
commit 6addc38342
2 changed files with 2 additions and 2 deletions

View File

@ -83,5 +83,5 @@ async def oauth_authorize(request):
} }
user = Identity.identity_oauth(user_input) user = Identity.identity_oauth(user_input)
token = await Authorize.authorize(user, device="pc") 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) return RedirectResponse(url = redirect_uri)

View File

@ -4,7 +4,7 @@ from os import environ
PORT = 8080 PORT = 8080
BACKEND_URL = environ.get("BACKEND_URL") or "https://localhost: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" 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" DB_URL = environ.get("DATABASE_URL") or environ.get("DB_URL") or "sqlite:///db.sqlite3"