diff options
-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__) |