fix: reintroduce NEXTAUTH_URL to fix logout redirect (#2905)

This commit is contained in:
Matti Nannt
2024-07-17 11:08:10 +02:00
committed by GitHub
parent f94d7f2b03
commit 271ea89c8d
7 changed files with 14 additions and 0 deletions

View File

@@ -8,6 +8,9 @@
WEBAPP_URL=http://localhost:3000
# Required for next-auth. Should be the same as WEBAPP_URL
NEXTAUTH_URL=http://localhost:3000
# Set this if you want to have a shorter link for surveys
SHORT_URL_BASE=

View File

@@ -15,6 +15,7 @@ These variables are present inside your machines docker-compose file. Restart
| Variable | Description | Required | Default |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------- |
| WEBAPP_URL | Base URL of the site. | required | http://localhost:3000 |
| NEXTAUTH_URL | Location of the auth server. This should normally be the same as WEBAPP_URL | required | http://localhost:3000 |
| DATABASE_URL | Database URL with credentials. | required | |
| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
| ENCRYPTION_KEY | Secret for used by Formbricks for data encryption | required | (Generated by the user) |

View File

@@ -677,6 +677,9 @@ x-environment: &environment
# The url of your Formbricks instance used in the admin panel
WEBAPP_URL:
# Required for next-auth. Should be the same as WEBAPP_URL
NEXTAUTH_URL:
# PostgreSQL DB for Formbricks to connect to
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public"

View File

@@ -1,6 +1,8 @@
# This should be the same as below if you are running via docker compose up
x-webapp-url: &webapp_url http://localhost:3000
x-nextauth-url: &nextauth_url http://localhost:3000
# PostgreSQL DB for Formbricks to connect to
x-database-url: &database_url postgresql://postgres:postgres@postgres:5432/formbricks?schema=public

View File

@@ -7,6 +7,9 @@ x-environment: &environment
# Set this to your public-facing URL, e.g., https://example.com
WEBAPP_URL:
# Required for next-auth. Should be the same as WEBAPP_URL
NEXTAUTH_URL:
# PostgreSQL DB for Formbricks to connect to
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public"

View File

@@ -143,6 +143,7 @@ EOT
echo "🚙 Updating docker-compose.yml with your custom inputs..."
sed -i "/WEBAPP_URL:/s|WEBAPP_URL:.*|WEBAPP_URL: \"https://$domain_name\"|" docker-compose.yml
sed -i "/NEXTAUTH_URL:/s|NEXTAUTH_URL:.*|NEXTAUTH_URL: \"https://$domain_name\"|" docker-compose.yml
nextauth_secret=$(openssl rand -hex 32) && sed -i "/NEXTAUTH_SECRET:$/s/NEXTAUTH_SECRET:.*/NEXTAUTH_SECRET: $nextauth_secret/" docker-compose.yml
echo "🚗 NEXTAUTH_SECRET updated successfully!"

View File

@@ -105,6 +105,7 @@
"OPENTELEMETRY_LISTENER_URL",
"NEXT_RUNTIME",
"NEXTAUTH_SECRET",
"NEXTAUTH_URL",
"NODE_ENV",
"OIDC_CLIENT_ID",
"OIDC_CLIENT_SECRET",