Skip to content
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

fix(next): improve dev environment variable handling #5763

Merged
merged 6 commits into from
Nov 20, 2022

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Nov 9, 2022

  1. We should not show a warning locally, as we can default to http://localhost:3000
  2. We should not use process.env.VERCEL or process.env.AUTH_TRUST_HOST in development by default. Introduce a new trustHost option to NextAuthOptions in case you still want to. (Not documented yet on purpose) (Implementation is verbose for detectHost params so we can avoid referencing process.env anywhere in core)

Slack discussion for @ThangHuuVu: https://vercel.slack.com/archives/D031RDYDJUF/p1666172865143889

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

Sorry, something went wrong.

@vercel
Copy link

vercel bot commented Nov 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
next-auth ✅ Ready (Inspect) Visit Preview Nov 20, 2022 at 9:00AM (UTC)

@github-actions github-actions bot added the core Refers to `@auth/core` label Nov 9, 2022
@balazsorban44 balazsorban44 changed the title fix(next): HIDE NEXTAUTH_URL warning locally fix(next): hide NEXTAUTH_URL warning locally Nov 9, 2022
@balazsorban44 balazsorban44 requested a review from 0ubbe as a code owner November 9, 2022 09:02
@github-actions github-actions bot added the TypeScript Issues relating to TypeScript label Nov 9, 2022
@balazsorban44 balazsorban44 changed the title fix(next): hide NEXTAUTH_URL warning locally fix(next): improve dev environment variable handling Nov 9, 2022
@vercel vercel bot temporarily deployed to Preview November 20, 2022 09:00 Inactive
@balazsorban44 balazsorban44 temporarily deployed to Preview November 20, 2022 09:01 Inactive
@github-actions
Copy link

🎉 Experimental release published 📦️ on npm!

pnpm add next-auth@0.0.0-pr.5763.5e81d58a
yarn add next-auth@0.0.0-pr.5763.5e81d58a
npm i next-auth@0.0.0-pr.5763.5e81d58a

@balazsorban44 balazsorban44 merged commit 0d17578 into main Nov 20, 2022
@balazsorban44 balazsorban44 deleted the fix/hide-nextauth-url-warning-locally branch November 20, 2022 09:08
@balazsorban44 balazsorban44 restored the fix/hide-nextauth-url-warning-locally branch December 3, 2022 11:41
@balazsorban44 balazsorban44 deleted the fix/hide-nextauth-url-warning-locally branch December 3, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant