fix: error layout global app

This commit is contained in:
Théo LAGACHE
2026-02-25 13:00:52 +01:00
parent 31285dd0d6
commit c8d390726c
5 changed files with 198 additions and 172 deletions
+7 -1
View File
@@ -44,6 +44,12 @@ import { getOAuthProviders } from "./oauth";
const oidcProviders = getOidcProviders();
export const auth = betterAuth({
onAPIError: {
errorURL: "/dashboard/home",
onError: (error, ctx) => {
//todo: capture errors in a monitoring service
},
},
database: drizzleAdapter(db, {
provider: "pg",
schema: drizzleDb.schemas,
@@ -134,7 +140,7 @@ export const auth = betterAuth({
trustedProviders: [
"credential",
...getOAuthProviders().map((p) => p.id),
...oidcProviders.map((p) => p.id)
...oidcProviders.map((p) => p.id),
],
allowDifferentEmails: true,
},