-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Next.js & Now – enable express server in Next.js does not work when deployed to Now #8565
Comments
Sorry the guide didn't make this clear: an Express custom server is not supported on Now. Can you please share your custom server? You may not need it. |
This comment has been minimized.
This comment has been minimized.
One of the example I intended to use in my application is to integrate with Auth0. On the Auth0 official website, they posted this tutorial to integrate Auth0 to use them as authentication for Next.js projects. They make heavy use of custom express server in their example. Please see https://auth0.com/blog/next-js-authentication-tutorial/. I believe the main use of custom express server here is to make use of server side component passport to authenticate and generate sessions, both something I needed. |
This may be off topic, but one of the older thread talked about the importance of using server side authentication with sites like Auth0, because of difficultly of storing and hiding JWT tokens from cross site scripting attacks from client side authentication. Re: #153 |
Filed a issue in our docs to fix this! We have a new Auth0 example coming soon. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When a Next.js app is configured to use Express server, the application will work in localhost, but when it is deployed to now, the Express server route fails.
A clear and concise description of what the bug is.
To Reproduce
Configure the Next.js project as follows:
now.json
In the package.json it contains the following script
Steps to reproduce the behavior, please provide code snippets or a repository:
Any Next.js project build with this configuration will work in localhost, but when deployed to now, the Express server routes will stop working.
Expected behavior
Expected a Next.js deployed to Zeit Now can use the Express server as SSR.
Zeit document link https://zeit.co/guides/custom-next-js-server-to-routes/?query=express#the-old-custom-server-method
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: