diff --git a/services/mana-core-auth/src/auth/better-auth.config.ts b/services/mana-core-auth/src/auth/better-auth.config.ts index b0f413981..6d618fe1a 100644 --- a/services/mana-core-auth/src/auth/better-auth.config.ts +++ b/services/mana-core-auth/src/auth/better-auth.config.ts @@ -323,6 +323,17 @@ export function createBetterAuth(databaseUrl: string) { metadata: { issuer: process.env.BASE_URL || 'http://localhost:3001', }, + // Trusted clients that skip consent screen + // These clients are considered first-party and don't need user consent + trustedClients: [ + { + clientId: 'matrix-synapse', + clientSecret: process.env.SYNAPSE_OIDC_CLIENT_SECRET || '', + name: 'Matrix Synapse', + redirectUrls: ['https://matrix.mana.how/_synapse/client/oidc/callback'], + skipConsent: true, + }, + ], }), ], });