diff options
author | Alexander_Kabui | 2024-09-18 12:11:02 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-09-18 12:11:02 +0300 |
commit | bb16286159c91c97840d228eba588322f9d4607d (patch) | |
tree | 927873f2a59b29368de550466cd7b07fd360f164 /gn2/wqflask/oauth2 | |
parent | 0df6031dfcd266d37c091c9088eb30c6fc8ad64d (diff) | |
download | genenetwork2-bb16286159c91c97840d228eba588322f9d4607d.tar.gz |
After login redirect users to the next request endpoint.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/toplevel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn2/wqflask/oauth2/toplevel.py b/gn2/wqflask/oauth2/toplevel.py index 24d60311..425c598e 100644 --- a/gn2/wqflask/oauth2/toplevel.py +++ b/gn2/wqflask/oauth2/toplevel.py @@ -81,7 +81,8 @@ def authorisation_code(): "token": session.user_token(), "logged_in": True }) - return redirect("/") + redirect_url = session.session_info().get("redirect_url", "/") + return redirect(redirect_url) return no_token_post("auth/token", json=request_data).either( lambda err: __error__(process_error(err)), __success__) |