MultiSite: one instance serves authentication across many domains #4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user