From 028e9cedad584f81ccb5cbb3fc09a55e6158e00d Mon Sep 17 00:00:00 2001
From: Frank Sauerburger <frank@sauerburger.com>
Date: Wed, 6 Jan 2021 13:48:12 +0100
Subject: [PATCH] Redirect to 'next' after SSO login

---
 uhepp_org/uhepp_vault/templates/registration/login.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uhepp_org/uhepp_vault/templates/registration/login.html b/uhepp_org/uhepp_vault/templates/registration/login.html
index ce44275..2f3d86f 100644
--- a/uhepp_org/uhepp_vault/templates/registration/login.html
+++ b/uhepp_org/uhepp_vault/templates/registration/login.html
@@ -19,7 +19,7 @@
         <small class="text-muted">preferred</small>
         </h2>
         <p>Use your CERN account to sign in or create a new account.</p>
-        <p><a tabindex="0" class="btn btn-primary" href="{% url 'oidc_authentication_init' %}">Sign in with CERN SSO</a></p>
+        <p><a tabindex="0" class="btn btn-primary" href="{% url 'oidc_authentication_init' %}{% if request.GET.next %}?next={{ request.GET.next }}{% endif %}">Sign in with CERN SSO</a></p>
     </div>
     <div class="col-md-6 px-4">
         <h2 class="mt-2">Uhepp hub account</h2>
-- 
GitLab