mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Restore AUTH_TRUSTED_ORIGINS for Better Auth
This commit is contained in:
1 parent
905010fba4
commit
8f22739436
2 files changed
+2
No files matched your search
@@ -32,6 +32,7 @@ export function createAuth(db: Database) {
|
||||
const auth = betterAuth({
|
||||
database: db,
|
||||
secret: ENV.AUTH.SECRET,
|
||||
trustedOrigins: ENV.AUTH.TRUSTED_ORIGINS.split(',').map((o: string) => o.trim()),
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
minPasswordLength: 8,
|
||||
|
||||
@@ -89,6 +89,7 @@ export const ENV = {
|
||||
|
||||
AUTH: {
|
||||
SECRET: getEnvString('AUTH_SECRET', process.env.NODE_ENV === 'production' ? '' : generateDefaultSecret()),
|
||||
TRUSTED_ORIGINS: getEnvString('AUTH_TRUSTED_ORIGINS', 'http://localhost:5173,http://localhost:5003'),
|
||||
ADMIN_EMAIL: process.env.ADMIN_EMAIL,
|
||||
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD,
|
||||
ADMIN_PASSWORD_RESET: getEnvBoolean('ADMIN_PASSWORD_RESET', false),
|
||||
|
||||
Reference in new issue
Block a user