diff --git a/authentik/flows/templates/if/flow-sfe.html b/authentik/flows/templates/if/flow-sfe.html index abea71934b..1dc99a80d7 100644 --- a/authentik/flows/templates/if/flow-sfe.html +++ b/authentik/flows/templates/if/flow-sfe.html @@ -15,6 +15,7 @@ {% endblock %} + {% include "base/header_js.html" %} {% endblock %} diff --git a/authentik/flows/views/interface.py b/authentik/flows/views/interface.py index 2806ba782f..d8b1e1cebc 100644 --- a/authentik/flows/views/interface.py +++ b/authentik/flows/views/interface.py @@ -13,7 +13,9 @@ class FlowInterfaceView(InterfaceView): """Flow interface""" def get_context_data(self, **kwargs: Any) -> dict[str, Any]: - kwargs["flow"] = get_object_or_404(Flow, slug=self.kwargs.get("flow_slug")) + flow = get_object_or_404(Flow, slug=self.kwargs.get("flow_slug")) + kwargs["flow"] = flow + kwargs["flow_background_url"] = flow.background_url(self.request) kwargs["inspector"] = "inspector" in self.request.GET return super().get_context_data(**kwargs) diff --git a/web/packages/sfe/src/index.ts b/web/packages/sfe/src/index.ts index a33e54a22a..a4cc79b62f 100644 --- a/web/packages/sfe/src/index.ts +++ b/web/packages/sfe/src/index.ts @@ -47,7 +47,16 @@ class SimpleFlowExecutor { return `${ak().api.base}api/v3/flows/executor/${this.flowSlug}/?query=${encodeURIComponent(window.location.search.substring(1))}`; } + loading() { + this.container.innerHTML = `
+
+ Loading... +
+
`; + } + start() { + this.loading(); $.ajax({ type: "GET", url: this.apiURL,