File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ import { getHubSpotUTK, submitToHubSpot } from "../utils/tracking/hubspot";
1818import { sendEmail } from "../verification/send-verification-email" ;
1919import { getPublicIpWithFallback } from "../wss/utils" ;
2020
21+ const query = await db . query . ssoProvider . findMany ( ) ;
22+
23+ const trustedProviders = query . map ( ( provider ) => provider . providerId ) ;
24+
2125const { handler, api } = betterAuth ( {
2226 database : drizzleAdapter ( db , {
2327 provider : "pg" ,
@@ -43,17 +47,14 @@ const { handler, api } = betterAuth({
4347 } ,
4448 }
4549 : { } ) ,
46- ...( IS_CLOUD
47- ? {
48- account : {
49- accountLinking : {
50- enabled : true ,
51- trustedProviders : [ "github" , "google" ] ,
52- allowDifferentEmails : true ,
53- } ,
54- } ,
55- }
56- : { } ) ,
50+
51+ account : {
52+ accountLinking : {
53+ enabled : true ,
54+ trustedProviders : [ "github" , "google" , ...( trustedProviders || [ ] ) ] ,
55+ allowDifferentEmails : true ,
56+ } ,
57+ } ,
5758 appName : "Dokploy" ,
5859 socialProviders : {
5960 github : {
You can’t perform that action at this time.
0 commit comments