andycmaj/nextjs-passport-session-auth

How about making an npm package based on this example?

Closed this issue · 2 comments

First, let me say this is the most outstanding example of integrating the passport ecosystem. I think the main idea of it is very general-purpose and many people will get benefits from it. How about creating an npm package for easier integration to Next.js projects?

Plus, I got some ideas to improve it. If you don't mind, can I try to create it based on your example?

  • I'd like to turn the httpOnly of cookies on, so we can't use next-cookies, parsing document.cookie on client-side.
  • User resolution on client-side could be achieved by __NEXT_DATA__

Never mind, I created an express-specific middleware composer. I inspired it from you, thank you!

@piglovesyou be my guest... happy to help. feel free to clone and do whatever you like... :)