From dac7ee0b48db3ec029c5459e1e78b906da6305f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Howe=20Gersager?= Date: Mon, 23 Nov 2020 16:16:56 +0100 Subject: [PATCH] use next_url if set explicit for JWT redirect --- django_saml2_auth/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django_saml2_auth/views.py b/django_saml2_auth/views.py index d3e478f..3db57ef 100644 --- a/django_saml2_auth/views.py +++ b/django_saml2_auth/views.py @@ -217,6 +217,9 @@ def acs(r): frontend_url = settings.SAML2_AUTH.get( 'FRONTEND_URL', next_url) + if next_url and next_url != _default_next_url(): + return HttpResponseRedirect(next_url+query) + return HttpResponseRedirect(frontend_url+query) if is_new_user: