diff --git a/web/src/admin/sources/SourceViewPage.ts b/web/src/admin/sources/SourceViewPage.ts
index d0050fdf98..3c010bdb0e 100644
--- a/web/src/admin/sources/SourceViewPage.ts
+++ b/web/src/admin/sources/SourceViewPage.ts
@@ -14,6 +14,18 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { Source, SourcesApi } from "@goauthentik/api";
+export function renderSourceIcon(name: string, iconUrl: string | undefined | null): TemplateResult {
+ const icon = html``;
+ if (iconUrl) {
+ if (iconUrl.startsWith("fa://")) {
+ const url = iconUrl.replaceAll("fa://", "");
+ return html``;
+ }
+ return html``;
+ }
+ return icon;
+}
+
@customElement("ak-source-view")
export class SourceViewPage extends AKElement {
@property({ type: String })
diff --git a/web/src/flow/stages/identification/IdentificationStage.ts b/web/src/flow/stages/identification/IdentificationStage.ts
index 25f407a39c..a30b0c89fa 100644
--- a/web/src/flow/stages/identification/IdentificationStage.ts
+++ b/web/src/flow/stages/identification/IdentificationStage.ts
@@ -1,3 +1,4 @@
+import { renderSourceIcon } from "@goauthentik/admin/sources/SourceViewPage";
import "@goauthentik/elements/Divider";
import "@goauthentik/elements/EmptyState";
import "@goauthentik/elements/forms/FormElement";
@@ -156,15 +157,7 @@ export class IdentificationStage extends BaseStage<
}
renderSource(source: LoginSource): TemplateResult {
- let icon = html``;
- if (source.iconUrl) {
- if (source.iconUrl.startsWith("fa://")) {
- const url = source.iconUrl.replaceAll("fa://", "");
- icon = html``;
- } else {
- icon = html`
`;
- }
- }
+ const icon = renderSourceIcon(source.name, source.iconUrl);
return html`