chore: Remove NEXTAUTH_URL (#2840)

This commit is contained in:
Dhruwang Jariwala
2024-07-08 13:46:41 +05:30
committed by GitHub
parent 60256533e3
commit 3927867c81
13 changed files with 4 additions and 28 deletions

View File

@@ -31,10 +31,6 @@ DATABASE_URL='postgresql://postgres:postgres@localhost:5432/formbricks?schema=pu
# You can use: `openssl rand -hex 32` to generate a secure one
NEXTAUTH_SECRET=RANDOM_STRING
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL=http://localhost:3000
# Cron Secret
# You can use: `openssl rand -hex 32` to generate a secure one
CRON_SECRET=

View File

@@ -18,7 +18,6 @@ jobs:
IS_FORMBRICKS_CLOUD: ${{ vars.IS_FORMBRICKS_CLOUD }}
WEBAPP_URL: ${{ vars.WEBAPP_URL }}
MIGRATE_DATABASE_URL: ${{ secrets.MIGRATE_DATABASE_URL }}
NEXTAUTH_URL: ${{ vars.NEXTAUTH_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}

View File

@@ -14,7 +14,6 @@ jobs:
DOCKER_BUILDKIT: 1
IS_FORMBRICKS_CLOUD: ${{ vars.IS_FORMBRICKS_CLOUD }}
WEBAPP_URL: ${{ vars.WEBAPP_URL }}
NEXTAUTH_URL: ${{ vars.NEXTAUTH_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
MIGRATE_DATABASE_URL: ${{ secrets.MIGRATE_DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}

View File

@@ -112,7 +112,7 @@ Enabling the Slack Integration in a self-hosted environment requires a setup usi
"go": next dev --experimental-https -p 3000
```
- You also need to update the .env file in the `apps/web` directory to include the `NEXTAUTH_URL` and `WEBAPP_URL` as `https://localhost:3000` instead of `http://localhost:3000`.
- You also need to update the .env file in the `apps/web` directory to include the `WEBAPP_URL` as `https://localhost:3000` instead of `http://localhost:3000`.
- You also need to run the terminal in admin mode to run the `go` script(to acquire the SSL certificate). You can do this by running the terminal as an administrator or using the `sudo` command in Unix-based systems.

View File

@@ -18,7 +18,6 @@ These variables are present inside your machines docker-compose file. Restart
| 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) |
| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | http://localhost:3000 |
| UPLOADS_DIR | Local directory for storing uploads. | optional | ./uploads |
| S3_ACCESS_KEY | Access key for S3. | optional | (resolved by the AWS SDK) |
| S3_SECRET_KEY | Secret key for S3. | optional | (resolved by the AWS SDK) |

View File

@@ -685,10 +685,6 @@ x-environment: &environment
# You can use: `openssl rand -hex 32` to generate one
NEXTAUTH_SECRET:
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL: http://localhost:3000
# PostgreSQL password
POSTGRES_PASSWORD: postgres

View File

@@ -153,6 +153,7 @@ const nextConfig = {
env: {
INSTANCE_ID: createId(),
INTERNAL_SECRET: createId(),
NEXTAUTH_URL: process.env.WEBAPP_URL,
},
};

View File

@@ -11,14 +11,10 @@ x-redis-url: &redis_url
x-nextauth-secret: &nextauth_secret
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
# Encryption key
# You can use: `openssl rand -hex 32` to generate one
x-nextauth-url: &nextauth_url http://localhost:3000
# Encryption key
# You can use: `openssl rand -hex 32` to generate one
x-encryption-key: &encryption_key
x-mail-from: &mail_from
@@ -91,7 +87,6 @@ services:
WEBAPP_URL: *webapp_url
DATABASE_URL: *database_url
NEXTAUTH_SECRET: *nextauth_secret
NEXTAUTH_URL: *nextauth_url
MAIL_FROM: *mail_from
SMTP_HOST: *smtp_host
SMTP_PORT: *smtp_port

View File

@@ -15,10 +15,6 @@ x-environment: &environment
# You can use: `openssl rand -hex 32` to generate one
NEXTAUTH_SECRET:
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL:
# Encryption Key is used for 2FA & Single use URLs for Link Surveys
# You can use: $(openssl rand -hex 32) to generate one
ENCRYPTION_KEY:

View File

@@ -143,7 +143,6 @@ 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

@@ -37,7 +37,6 @@ env:
secret:
- IS_FORMBRICKS_CLOUD
- WEBAPP_URL
- NEXTAUTH_URL
- DATABASE_URL
- MIGRATE_DATABASE_URL
- NEXTAUTH_SECRET

View File

@@ -42,7 +42,6 @@ export const env = createEnv({
IS_FORMBRICKS_CLOUD: z.enum(["1", "0"]).optional(),
MAIL_FROM: z.string().email().optional(),
NEXTAUTH_SECRET: z.string().min(1),
NEXTAUTH_URL: z.string().url().optional(),
NOTION_OAUTH_CLIENT_ID: z.string().optional(),
NOTION_OAUTH_CLIENT_SECRET: z.string().optional(),
OIDC_CLIENT_ID: z.string().optional(),
@@ -143,7 +142,6 @@ export const env = createEnv({
IS_FORMBRICKS_CLOUD: process.env.IS_FORMBRICKS_CLOUD,
MAIL_FROM: process.env.MAIL_FROM,
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
NEXT_PUBLIC_FORMBRICKS_API_HOST: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID: process.env.NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID,

View File

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