We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4f3987 commit f663a12Copy full SHA for f663a12
1 file changed
apps/sim/lib/auth.ts
@@ -16,6 +16,7 @@ import {
16
import { createLogger } from '@/lib/logs/console-logger'
17
import { db } from '@/db'
18
import * as schema from '@/db/schema'
19
+import { getBaseURL } from './auth-client'
20
import { env, isTruthy } from './env'
21
import { getEmailDomain } from './urls/utils'
22
@@ -55,6 +56,11 @@ const resend = validResendAPIKEY
55
56
}
57
58
export const auth = betterAuth({
59
+ baseURL: getBaseURL(),
60
+ trustedOrigins: [
61
+ env.NEXT_PUBLIC_APP_URL,
62
+ ...(env.NEXT_PUBLIC_VERCEL_URL ? [`https://${env.NEXT_PUBLIC_VERCEL_URL}`] : []),
63
+ ].filter(Boolean),
64
database: drizzleAdapter(db, {
65
provider: 'pg',
66
schema,
0 commit comments