mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-23 04:18:45 +00:00
feat(auth): update trusted providers configuration to use environment variable
- Replaced database query for trusted providers with an environment variable, allowing for more flexible configuration of SSO integrations.
This commit is contained in:
@@ -18,9 +18,7 @@ import { getHubSpotUTK, submitToHubSpot } from "../utils/tracking/hubspot";
|
|||||||
import { sendEmail } from "../verification/send-verification-email";
|
import { sendEmail } from "../verification/send-verification-email";
|
||||||
import { getPublicIpWithFallback } from "../wss/utils";
|
import { getPublicIpWithFallback } from "../wss/utils";
|
||||||
|
|
||||||
const query = await db.query.ssoProvider.findMany();
|
const trustedProviders = process.env?.TRUSTED_PROVIDERS?.split(",") || [];
|
||||||
|
|
||||||
const trustedProviders = query.map((provider) => provider.providerId);
|
|
||||||
|
|
||||||
const { handler, api } = betterAuth({
|
const { handler, api } = betterAuth({
|
||||||
database: drizzleAdapter(db, {
|
database: drizzleAdapter(db, {
|
||||||
|
|||||||
Reference in New Issue
Block a user