set cookie on oauth
This commit is contained in:
@@ -83,5 +83,7 @@ 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))
|
||||
return RedirectResponse(url = redirect_uri)
|
||||
|
||||
response = RedirectResponse(url = OAUTH_CALLBACK_URL)
|
||||
response.set_cookie("token", token)
|
||||
return response
|
||||
|
||||
@@ -5,7 +5,7 @@ PORT = 8080
|
||||
INBOX_SERVICE_PORT = 8081
|
||||
|
||||
BACKEND_URL = environ.get("BACKEND_URL") or "https://localhost:8080"
|
||||
OAUTH_CALLBACK_URL = environ.get("OAUTH_CALLBACK_URL") or "https://localhost:8080/auth/key-"
|
||||
OAUTH_CALLBACK_URL = environ.get("OAUTH_CALLBACK_URL") or "https://localhost:8080"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user