diff --git a/authentik/sources/oauth/views/redirect.py b/authentik/sources/oauth/views/redirect.py index 39f1faa8b..5d7e06d32 100644 --- a/authentik/sources/oauth/views/redirect.py +++ b/authentik/sources/oauth/views/redirect.py @@ -6,6 +6,7 @@ from django.urls import reverse from django.views.generic import RedirectView from structlog.stdlib import get_logger +from authentik.flows.views import FlowExecutorView from authentik.sources.oauth.models import OAuthSource from authentik.sources.oauth.views.base import OAuthClientMixin @@ -42,4 +43,5 @@ class OAuthRedirect(OAuthClientMixin, RedirectView): raise Http404(f"source {slug} is not enabled.") client = self.get_client(source, callback=self.get_callback_url(source)) params = self.get_additional_parameters(source) + FlowExecutorView().cancel() return client.get_redirect_url(params) diff --git a/internal/outpost/proxy/proxy.go b/internal/outpost/proxy/proxy.go index 9a5b22374..5ead7895f 100644 --- a/internal/outpost/proxy/proxy.go +++ b/internal/outpost/proxy/proxy.go @@ -121,7 +121,7 @@ func NewOAuthProxy(opts *options.Options, provider api.ProxyOutpostConfig, c *ht redirectURL.Path = fmt.Sprintf("%s/callback", opts.ProxyPrefix) } - logger.WithField("auth_url", opts.GetProvider().Data().LoginURL).WithField("client_id", opts.ClientID).Info("proxy instance configured") + logger.WithField("auth_url", opts.GetProvider().Data().LoginURL.String()).WithField("client_id", opts.ClientID).Info("proxy instance configured") sessionChain := buildSessionChain(opts, sessionStore)