sources/oauth: don't cancel flow when redirecting
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
bc7d5042df
commit
6c805bcf32
|
@ -6,7 +6,6 @@ from django.urls import reverse
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
from structlog.stdlib import get_logger
|
from structlog.stdlib import get_logger
|
||||||
|
|
||||||
from authentik.flows.views import FlowExecutorView
|
|
||||||
from authentik.sources.oauth.models import OAuthSource
|
from authentik.sources.oauth.models import OAuthSource
|
||||||
from authentik.sources.oauth.views.base import OAuthClientMixin
|
from authentik.sources.oauth.views.base import OAuthClientMixin
|
||||||
|
|
||||||
|
@ -43,5 +42,4 @@ class OAuthRedirect(OAuthClientMixin, RedirectView):
|
||||||
raise Http404(f"source {slug} is not enabled.")
|
raise Http404(f"source {slug} is not enabled.")
|
||||||
client = self.get_client(source, callback=self.get_callback_url(source))
|
client = self.get_client(source, callback=self.get_callback_url(source))
|
||||||
params = self.get_additional_parameters(source)
|
params = self.get_additional_parameters(source)
|
||||||
FlowExecutorView(request=self.request).cancel()
|
|
||||||
return client.get_redirect_url(params)
|
return client.get_redirect_url(params)
|
||||||
|
|
Reference in New Issue