mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
26 lines
532 B
TypeScript
26 lines
532 B
TypeScript
import type { BetterAuthClientPlugin } from "better-auth";
|
|
import type { SSOPlugin } from "./index";
|
|
|
|
interface SSOClientOptions {
|
|
domainVerification?:
|
|
| {
|
|
enabled: boolean;
|
|
}
|
|
| undefined;
|
|
}
|
|
|
|
export const ssoClient = <CO extends SSOClientOptions>(
|
|
options?: CO | undefined,
|
|
) => {
|
|
return {
|
|
id: "sso-client",
|
|
$InferServerPlugin: {} as SSOPlugin<{
|
|
domainVerification: {
|
|
enabled: CO["domainVerification"] extends { enabled: true }
|
|
? true
|
|
: false;
|
|
};
|
|
}>,
|
|
} satisfies BetterAuthClientPlugin;
|
|
};
|