From bb16286159c91c97840d228eba588322f9d4607d Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 18 Sep 2024 12:11:02 +0300 Subject: After login redirect users to the next request endpoint. --- gn2/wqflask/oauth2/toplevel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gn2/wqflask/oauth2') 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__) -- cgit v1.2.3