chore(sso): clean up SAML test suite (#6839)

This commit is contained in:
Paola Estefanía de Campos
2025-12-23 00:11:10 -03:00
committed by github-actions[bot]
parent 06f4040689
commit 1ddf35abbd

View File

@@ -836,14 +836,20 @@ export const registerSSOProvider = <O extends SSOOptions>(options: O) => {
});
}
type SSOProviderResponse = {
redirectURI: string;
oidcConfig: OIDCConfig | null;
samlConfig: SAMLConfig | null;
} & Omit<SSOProvider<O>, "oidcConfig" | "samlConfig">;
type SSOProviderReturn = O["domainVerification"] extends { enabled: true }
? {
? SSOProviderResponse & {
domainVerified: boolean;
domainVerificationToken: string;
} & SSOProvider<O>
: SSOProvider<O>;
}
: SSOProviderResponse;
return ctx.json({
const result = {
...provider,
oidcConfig: safeJsonParse<OIDCConfig>(
provider.oidcConfig as unknown as string,
@@ -856,7 +862,9 @@ export const registerSSOProvider = <O extends SSOOptions>(options: O) => {
...(options?.domainVerification?.enabled
? { domainVerificationToken }
: {}),
} as unknown as SSOProviderReturn);
};
return ctx.json(result as SSOProviderReturn);
},
);
};