menu

Next.js

A place to chat about Next.js and answer questions. For all other ZEIT products, check this out.

Channels
Team

Is the Custom Server feature of Next.js going to be deprecated?

February 8, 2020 at 5:53pm
The Next.js community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

Is the Custom Server feature of Next.js going to be deprecated?

February 8, 2020 at 5:53pm
We're about to start a new project that requires SAML authentication and we've traditionally implemented this with Passport.js. I was going to suggest Next.js with a custom express server, but I've seen multiple people lately allude to or even state outright that the custom server feature of Next.js is on its way to deprecation in favor of API routes, serverless functions, etc.
Can anyone confirm or deny that?
Thanks!

February 8, 2020 at 9:24pm
I can't confirm yay or nay on your exact question, but I can confirm that you can still use Passport without needing a custom server. I have a working example of Passport on API routes authenticating with Github and email, as well as session storage using MongoDB I could probably whip up into a tutorial of some kind if you'd like.
Edited
  • reply
  • like
I would definitely love to see that, please and thank you! I looked into it once before and ran into something that prevented it from working but the exact reason escapes me at the moment.
  • reply
  • like
Next.js will likely always work within a "custom server", but its APIs are frozen. No new features/APIs will be added for custom servers.
  • reply
  • like
I would definitely love to see that, please and thank you! I looked into it once before and ran into something that prevented it from working but the exact reason escapes me at the moment.
Ok Cool. I'll try and get it together this week and let you know as soon ASAP.
  • reply
  • like

February 9, 2020 at 7:05pm
Here's a repo for you to play around with. Sorry it's not a more traditional tutorial, but I put comments where I thought more clarification was needed. Please have a gander at the Readme as well
  • reply
  • like
Next.js will likely always work within a "custom server", but its APIs are frozen. No new features/APIs will be added for custom servers.
Thanks, , that helps.
  • reply
  • like
Here's a repo for you to play around with. Sorry it's not a more traditional tutorial, but I put comments where I thought more clarification was needed. Please have a gander at the Readme as well
Great, thanks - I will definitely take a look.
  • reply
  • like