mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Add baseURL and basePath to Better Auth config
This commit is contained in:
1 parent
ddb3ce214d
commit
10fd14ac4d
1 file changed
+4
@@ -29,7 +29,11 @@ export function createAuth(db: Database) {
|
||||
}
|
||||
}
|
||||
|
||||
const baseURL = ENV.AUTH.TRUSTED_ORIGINS.split(',')[0]?.trim() || `http://localhost:${ENV.SERVER.PORT}`
|
||||
|
||||
const auth = betterAuth({
|
||||
baseURL,
|
||||
basePath: '/api/auth',
|
||||
database: db,
|
||||
secret: ENV.AUTH.SECRET,
|
||||
trustedOrigins: ENV.AUTH.TRUSTED_ORIGINS.split(',').map((o: string) => o.trim()),
|
||||
|
||||
Reference in new issue
Block a user