fix: type

This commit is contained in:
Alex Yang
2026-02-13 14:47:18 +08:00
parent dd3a070f49
commit 41b72f6590

View File

@@ -1,18 +1,12 @@
import type { DBAdapter } from "@better-auth/core/db/adapter";
import * as saml from "samlify";
import type { SAMLConfig, SSOOptions, SSOProvider } from "../types";
import { safeJsonParse } from "../utils";
export type Adapter = {
findOne: <T>(options: {
model: string;
where: Array<{ field: string; value: string }>;
}) => Promise<T | null>;
};
export async function findSAMLProvider(
providerId: string,
options: SSOOptions | undefined,
adapter: Adapter,
adapter: DBAdapter,
): Promise<SSOProvider<SSOOptions> | null> {
if (options?.defaultSSO?.length) {
const match = options.defaultSSO.find((p) => p.providerId === providerId);