diff --git a/frontend/src/lib/components/AuthentikSetting.svelte b/frontend/src/lib/components/AuthentikSetting.svelte
index 9ddb0769f3..e9952308eb 100644
--- a/frontend/src/lib/components/AuthentikSetting.svelte
+++ b/frontend/src/lib/components/AuthentikSetting.svelte
@@ -6,12 +6,13 @@
$: enabled = value != undefined
- let org = ''
+ // Initialize org from existing auth_url
+ $: org = value?.connect_config?.auth_url?.replace('/application/o/authorize/', '') ?? ''
$: changeOrg(org)
function changeOrg(org) {
- if (value) {
+ if (value && org) {
value = {
...value,
connect_config: {
@@ -50,7 +51,7 @@
Authentik Url ({'AUTHENTIK_HOST/application/o/authorize/'})
-
+