mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-05 20:21:19 +02:00
♻️ Prioritize variant in place of idp.type if available
This commit is contained in:
@@ -91,6 +91,7 @@ export default async function Page(props: {
|
|||||||
let loginIdps: LoginFormIDP[] = [];
|
let loginIdps: LoginFormIDP[] = [];
|
||||||
let lastUsedIdpForSmartLogin: (LoginFormIDP & { orgId?: string }) | null =
|
let lastUsedIdpForSmartLogin: (LoginFormIDP & { orgId?: string }) | null =
|
||||||
null;
|
null;
|
||||||
|
|
||||||
if (!useSmartLogin) {
|
if (!useSmartLogin) {
|
||||||
// Load IdPs for DashboardLoginForm (OSS or org-only IdP mode)
|
// Load IdPs for DashboardLoginForm (OSS or org-only IdP mode)
|
||||||
if (build === "oss" || env.app.identityProviderMode !== "org") {
|
if (build === "oss" || env.app.identityProviderMode !== "org") {
|
||||||
@@ -117,12 +118,12 @@ export default async function Page(props: {
|
|||||||
`/idp/${persistedData.idpId}`
|
`/idp/${persistedData.idpId}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const idp = idpRes.data.data.idp;
|
const res = idpRes.data.data;
|
||||||
|
|
||||||
lastUsedIdpForSmartLogin = {
|
lastUsedIdpForSmartLogin = {
|
||||||
idpId: idp.idpId,
|
idpId: res.idp.idpId,
|
||||||
name: idp.name,
|
name: res.idp.name,
|
||||||
variant: idp.type,
|
variant: res.idpOidcConfig?.variant ?? res.idp.type,
|
||||||
orgId: persistedData.orgId,
|
orgId: persistedData.orgId,
|
||||||
lastUsed: true
|
lastUsed: true
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user