Fix OIDC logo conditional display

This commit is contained in:
Peter Clement 2021-07-09 15:50:46 +01:00
parent 90e6db2be1
commit de075a7549
3 changed files with 6 additions and 6 deletions

View File

@ -24,9 +24,9 @@
<ActionButton on:click={() => window.open("/api/admin/auth/oidc", "_blank")}>
<div class="inner">
<img
src={preDefinedIcons[oidcIcon]
src={!oidcIcon ? OidcLogo : preDefinedIcons[oidcIcon]
? preDefinedIcons[oidcIcon]
: `/global/oidc_logos/${oidcIcon}` || OidcLogo}
: `/global/oidc_logos/${oidcIcon}`}
alt="oidc icon"
/>
<p>{`Sign in with ${oidcName || "OIDC"}`}</p>

View File

@ -46,12 +46,12 @@
}
const OIDCConfigFields = {
Oidc: ["configUrl", "clientId", "clientSecret"],
Oidc: ["configUrl", "clientID", "clientSecret"],
}
const OIDCConfigLabels = {
Oidc: {
configUrl: "Config URL",
clientId: "Client ID",
clientID: "Client ID",
clientSecret: "Client Secret",
},
}

View File

@ -47,8 +47,8 @@ function oidcValidation() {
clientID: Joi.string().required(),
clientSecret: Joi.string().required(),
configUrl: Joi.string().required(),
iconName: Joi.string().required(),
name: Joi.string().required(),
iconName: Joi.string().optional(),
name: Joi.string().optional(),
}).unknown(true)
}