sso: normalize provider config via discovery

This commit is contained in:
Arunavo Ray
2025-10-22 16:33:33 +05:30
parent e4e54722cf
commit 847823bbf8
6 changed files with 507 additions and 68 deletions

View File

@@ -5,6 +5,9 @@ import { sso } from "@better-auth/sso";
import { db, users } from "./db";
import * as schema from "./db/schema";
import { eq } from "drizzle-orm";
import { ensureValidSsoProviders } from "./sso/provider-maintenance";
await ensureValidSsoProviders();
export const auth = betterAuth({
// Database configuration
@@ -171,4 +174,4 @@ export const auth = betterAuth({
});
// Export type for use in other parts of the app
export type Auth = typeof auth;
export type Auth = typeof auth;