-
Notifications
You must be signed in to change notification settings - Fork 86
fix: respect variable set in Netlify config for NEXTAUTH_URL #1613
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
Conversation
also support deploy preview urls for the NEXTAUTH_URL value
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-hp-edge-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
❌ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo failed.
|
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for nextjs-plugin-custom-routes-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
❌ Deploy Preview for next-plugin-rsc-demo failed.
|
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.
Looks good
also support deploy preview urls for the NEXTAUTH_URL value
Summary
Fixes #1611
Values set for the
NEXTAUTH_URL
withinnetlify.toml
or the Netlify UI weren't being set correctly as part of the build process, so these changes not factor that into the logic for patching therequired_server_files.json
.We also previously would only set the NEXTAUTH_URL to the production URL value. This now supports branch deploy or deploy preview URLs as the NEXTAUTH_URL value.
Test plan
There's repro steps on the issue but tl;dr - try various permutations of setting the URL via the netlify.toml, netlify ui, environment variable, not setting it at all in the
next-auth
projectRelevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal