Keep existing config we don't have fields for (#3639)
This commit is contained in:
parent
44436f5935
commit
37afe07bd5
1 changed files with 9 additions and 3 deletions
|
@ -162,8 +162,8 @@ export default function DetailSettings() {
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
const save = async (provider?: IdentityProviderRepresentation) => {
|
const save = async (savedProvider?: IdentityProviderRepresentation) => {
|
||||||
const p = provider || getValues();
|
const p = savedProvider || getValues();
|
||||||
if (p.config?.authnContextClassRefs)
|
if (p.config?.authnContextClassRefs)
|
||||||
p.config.authnContextClassRefs = JSON.stringify(
|
p.config.authnContextClassRefs = JSON.stringify(
|
||||||
p.config.authnContextClassRefs
|
p.config.authnContextClassRefs
|
||||||
|
@ -172,10 +172,16 @@ export default function DetailSettings() {
|
||||||
p.config.authnContextDeclRefs = JSON.stringify(
|
p.config.authnContextDeclRefs = JSON.stringify(
|
||||||
p.config.authnContextDeclRefs
|
p.config.authnContextDeclRefs
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await adminClient.identityProviders.update(
|
await adminClient.identityProviders.update(
|
||||||
{ alias },
|
{ alias },
|
||||||
{ ...p, alias, providerId }
|
{
|
||||||
|
...p,
|
||||||
|
config: { ...provider?.config, ...p.config },
|
||||||
|
alias,
|
||||||
|
providerId,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
addAlert(t("updateSuccess"), AlertVariant.success);
|
addAlert(t("updateSuccess"), AlertVariant.success);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue