Skip to content

Commit

Permalink
Merge pull request #3 from syre/feature/39750_add_redirect_if_using_jwt
Browse files Browse the repository at this point in the history
use next_url in JWT redirect
  • Loading branch information
agger-magenta authored Nov 24, 2020
2 parents 571afd9 + dac7ee0 commit b3d2a15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_saml2_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b3d2a15

Please sign in to comment.