-
Notifications
You must be signed in to change notification settings - Fork 86
fix: use process.env.URL when deploying to production #1680
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
✅ 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 netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
❌ Deploy Preview for next-i18next-demo failed.
|
✅ Deploy Preview for next-plugin-canary 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 netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-rsc-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 netlify-plugin-nextjs-nx-monorepo-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-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for ep-next-auth ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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 great @ericapisani! Left some dusty comments 🚀
Co-authored-by: Nick Taylor <[email protected]>
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.
Thanks for making the changes! 🚀
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.
🚀
Summary
next-auth
to the latestNEXTAUTH_URL
.next-auth
uses that URL as the basis for updating it's provider information. For instance - the callback URL used for OAuth applications (since it expects a stable value). This change makes the URL stable by using the 'URL' rather than theDEPLOY_PRIME_URL
when it detects that theCONTEXT
is set to 'production'Test plan
/admin
or/me
, the URL that it goes to should be the URL of the site (e.g:https://deploy-preview-1680--netlify-plugin-nextjs-next-auth-demo.netlify.app/api/callback....
)/admin
and/me
pages/admin
or/me
, the URL that it goes to should start withhttps://ep-next-auth.netlify.app/
nothttps://upgrade-next-auth--ep-next-auth.netlify.app
/me
endpoint, but the/admin
page should still be inaccessible sinceuserRole: admin
is not set on the returned token that makes that page accessible.