Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ POSTGRES_DIRECT_URL=
AUTH=
AUTH_TRUST_HOST=
AUTH_SECRET=
NEXTAUTH_URL=
AUTH_URL=

DRIVE_CLIENT_ID=
DRIVE_CLIENT_SECRET=
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
SQLITE_URL: file:./prisma/dev.db
DB: sqlite
AUTH_SECRET: test-secret
NEXTAUTH_URL: http://localhost:3000
AUTH_URL: http://localhost:3000
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Pull and run with defaults (port 3000 inside the container):
docker pull ghcr.io/openchatui/openchatui:latest
docker run --name openchat \
-p 3000:3000 \
-e NEXTAUTH_URL="http://localhost:3000" \
-e AUTH_URL="http://localhost:3000" \
-e AUTH_SECRET="$(openssl rand -base64 32)" \
-v "$(pwd)/data/prisma:/prisma" \
--restart unless-stopped \
Expand All @@ -74,7 +74,7 @@ Examples:
```bash
docker run \
-p 3000:3000 \
-e NEXTAUTH_URL="http://localhost:3000" \
-e AUTH_URL="http://localhost:3000" \
-e AUTH_SECRET="$(openssl rand -base64 32)" \
-e AUTH=false \
-v "$(pwd)/data/prisma:/prisma" \
Expand Down Expand Up @@ -108,7 +108,7 @@ docker compose down
```

> [!TIP]
> - Change the external port by editing `ports` and the internal app port by `environment: PORT` and `NEXTAUTH_URL`.
> - Change the external port by editing `ports` and the internal app port by `environment: PORT` and `AUTH_URL`.
> - Persist data: by default `./prisma:/prisma` stores the SQLite database on the host.
> - Switch to PostgreSQL: set `DB=postgres` and provide `DATABASE_URL` in `environment`. You can add a separate Postgres service if needed.

Expand Down
2 changes: 1 addition & 1 deletion lib/api/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function httpFetch(input: RequestInfo, init?: RequestInit): Promise

// When behind a reverse proxy, forward the external host for Auth.js validation
// Auth.js with trustHost:true will validate against these headers
const externalUrl = process.env.AUTH_URL || process.env.NEXTAUTH_URL
const externalUrl = process.env.AUTH_URL
if (externalUrl) {
try {
const url = new URL(externalUrl)
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/drive/providers/google-drive.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function getUserAccount(userId: string) {
function getOAuthClient() {
const clientId = process.env.DRIVE_CLIENT_ID
const clientSecret = process.env.DRIVE_CLIENT_SECRET
const redirectUri = process.env.NEXTAUTH_URL+'/api/auth/callback/google-drive'
const redirectUri = process.env.AUTH_URL+'/api/auth/callback/google-drive'
if (!clientId || !clientSecret) {
return new google.auth.OAuth2()
}
Expand Down