More robust/correct discovery and icon URL handling.

This commit is contained in:
Leo Vasanko
2026-02-17 15:30:39 +00:00
parent 239b9b436b
commit fa53ba11f8
+9 -2
View File
@@ -15,15 +15,22 @@ const emit = defineEmits(['save', 'cancel', 'delete', 'resetSecret', 'createPerm
const authStore = useAuthStore()
const headerRef = ref(null)
// Helper function to build URLs
function authSitePath(path) {
const url = new URL(authStore.settings.auth_site_url)
url.pathname = path
return url.toString()
}
// Local form state
const name = ref('')
const redirectUris = ref('')
const clientSecret = ref(null)
// Computed
const discoveryUrl = computed(() => `${window.location.origin}/.well-known/openid-configuration`)
const clientId = computed(() => props.client?.client_id || props.client?.uuid || '')
const iconUrl = computed(() => `${authStore.settings.auth_site_url}/favicon.ico`)
const discoveryUrl = computed(() => authSitePath('/.well-known/openid-configuration'))
const iconUrl = computed(() => authSitePath('/favicon.ico'))
// Groups (permissions) scoped to this client
const clientGroups = computed(() => {