MultiSite: one instance serves authentication across many domains #4

Merged
LeoVasanko merged 48 commits from multihost into main 2026-09-07 22:02:06 +00:00
Showing only changes of commit 7f1688e1f5 - Show all commits
+5 -2
View File
@@ -68,8 +68,11 @@ const LIST_VALIDATION = { origins: 'originValidation', related_origins: 'related
function addEntry(field) {
const d = props.dialog?.data
if (!d) return
// Prefill the in-domain list with the rp-id; related domains start blank
d[field].push(field === 'origins' ? realmRpId.value : '')
// Prefill the in-domain list: with the origin the admin is currently on
// when editing that very domain (so saving never locks them out), else
// with the rp-id (https default). Related domains start blank.
const onThisDomain = authStore.settings?.rp_id && d.rp_id === authStore.settings.rp_id
d[field].push(field === 'origins' ? (onThisDomain ? window.location.origin : realmRpId.value) : '')
d[LIST_VALIDATION[field]].push(null)
const i = d[field].length - 1
if (d[field][i]) validateEntry(field, i)