mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-30 19:06:47 -05:00
chore(sso): clean up SAML test suite (#6839)
This commit is contained in:
committed by
github-actions[bot]
parent
06f4040689
commit
1ddf35abbd
@@ -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);
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user