-
Notifications
You must be signed in to change notification settings - Fork 46.2k
dx(frontend): Update .env.default #11280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Pwuts
wants to merge
2
commits into
dev
Choose a base branch
from
pwuts/fix-frontend-default-env
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21
β13
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,26 @@ | ||
| NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000 | ||
| NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE | ||
| NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/api | ||
| NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws | ||
| NEXT_PUBLIC_FRONTEND_BASE_URL=http://localhost:3000 | ||
| AUTH_CALLBACK_URL="${NEXT_PUBLIC_FRONTEND_BASE_URL}/auth/callback" | ||
|
|
||
| NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/api | ||
| NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws | ||
| NEXT_PUBLIC_FRONTEND_BASE_URL=http://localhost:3000 | ||
| NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000 | ||
| NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE | ||
|
|
||
| NEXT_PUBLIC_APP_ENV=local | ||
| NEXT_PUBLIC_BEHAVE_AS=LOCAL | ||
| # When running locally, set NEXT_PUBLIC_BEHAVE_AS=CLOUD to use the a locally hosted marketplace (as is typical in development, and the cloud deployment), otherwise set it to LOCAL to have the marketplace open in a new tab | ||
| NEXT_PUBLIC_APP_ENV=local | ||
| NEXT_PUBLIC_BEHAVE_AS=LOCAL | ||
|
|
||
| NEXT_PUBLIC_LAUNCHDARKLY_ENABLED=false | ||
| NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID=687ab1372f497809b131e06e | ||
| ## LaunchDarkly configuration | ||
| NEXT_PUBLIC_LAUNCHDARKLY_ENABLED=false | ||
| NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID=687ab1372f497809b131e06e | ||
|
|
||
| NEXT_PUBLIC_TURNSTILE=disabled | ||
| NEXT_PUBLIC_REACT_QUERY_DEVTOOL=true | ||
| ## Cloudflare Turnstile (CAPTCHA) Configuration | ||
| ## Get these from the Cloudflare Turnstile dashboard: https://dash.cloudflare.com/?to=/:account/turnstile | ||
| ## This is the frontend site key | ||
| NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY= | ||
| NEXT_PUBLIC_TURNSTILE=disabled | ||
|
|
||
| NEXT_PUBLIC_GA_MEASUREMENT_ID=G-FH2XK2W4GN | ||
|
|
||
| # Devtools | ||
| NEXT_PUBLIC_REACT_QUERY_DEVTOOL=true | ||
|
|
||
| NEXT_PUBLIC_GA_MEASUREMENT_ID=G-FH2XK2W4GN | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug:
AUTH_CALLBACK_URLin.env.defaultuses unsupported variable expansion, resulting in an invalid literal string for OAuth callbacks.Severity: HIGH | Confidence: 0.95
π Detailed Analysis
The
AUTH_CALLBACK_URLin.env.defaultis defined with variable syntax like${NEXT_PUBLIC_FRONTEND_BASE_URL}/auth/callback. Thedotenvlibrary (v17.2.1) and current Next.js configuration do not support shell-style variable expansion. Consequently,AUTH_CALLBACK_URLis set to the literal string"${NEXT_PUBLIC_FRONTEND_BASE_URL}/auth/callback". This invalid URL is then used for OAuth redirects, causing authentication failures in local development environments. The fallbackhttp://localhost:3000/auth/callbackis not utilized becauseAUTH_CALLBACK_URLis technically defined.π‘ Suggested Fix
Either hardcode
AUTH_CALLBACK_URLtohttp://localhost:3000/auth/callbackin.env.defaultor implementdotenvvariable expansion support (e.g., viadotenv-expandor@next/envconfiguration).π€ Prompt for AI Agent
Did we get this right? π / π to inform future reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pwuts this could be an issue?