diff --git a/django_saml2_auth/views.py b/django_saml2_auth/views.py index 7aa222a..b1ad374 100644 --- a/django_saml2_auth/views.py +++ b/django_saml2_auth/views.py @@ -160,11 +160,10 @@ def acs(request: HttpRequest): query = f"?token={jwt_token}" # Use JWT auth to send token to frontend + frontend_url = dictor(saml2_auth_settings, "FRONTEND_URL", next_url) custom_frontend_url_trigger = dictor(saml2_auth_settings, "TRIGGER.GET_CUSTOM_FRONTEND_URL") if custom_frontend_url_trigger: - frontend_url = run_hook(custom_frontend_url_trigger, relay_state) - else: - frontend_url = dictor(saml2_auth_settings, "FRONTEND_URL", next_url) + frontend_url = run_hook(custom_frontend_url_trigger, relay_state) # type: ignore return HttpResponseRedirect(frontend_url + query)