More robust/correct discovery and icon URL handling.
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user