From 07336d32721966236061ab9b8da0bc6527d060d1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 27 Sep 2020 17:20:14 +0200 Subject: [PATCH] Fixed login redirect page [closes #154] --- platypush/backend/http/app/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/http/app/utils.py b/platypush/backend/http/app/utils.py index e79bf5cc..d435ee30 100644 --- a/platypush/backend/http/app/utils.py +++ b/platypush/backend/http/app/utils.py @@ -201,7 +201,7 @@ def authenticate(redirect_page='', skip_auth_methods=None, check_csrf_token=Fals if session_auth_ok: return f(*args, **kwargs) - return redirect('/login?redirect=' + redirect_page, 307) + return redirect('/login?redirect=' + (redirect_page or request.url), 307) # CSRF token check if check_csrf_token: