vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.39k stars 26.78k forks source link

Authentication (Facebook, Twitter, Google) using external API #5337

Closed theprobugmaker closed 6 years ago

theprobugmaker commented 6 years ago

I have a headless API using express and passport.js with a few strategies for OAuth authentication and also a local strategy for username and password with jwt + cookies. I was wondering how can I use my external API in next.js? Am I supposed to redirect the user to my API routes for authentication and the API redirects the user back to the client? I really need to understand the flow and how people usually do that. Thank you in advance.

timneutkens commented 6 years ago

Please post questions on https://spectrum.chat/next-js, as you'll reach more people. (As per the issue template)