Skip to content
Discussion options

You must be logged in to vote

The with-passport example is to explain how to use Passport with API routes. I think all examples aim to show how to use different tech in Next.js.

So, I think the example won't be of much help when you use an external API with Passport.

There are different ways to approach your setup, you can make calls from the client to your external API and share a token between the Next.js app and your API. You can also create API routes in your Next.js app that will call your external API.

If you need to use an external API and want to keep the session management in Next.js you could handle your sessions with API routes and query your external API from there too.

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@j0lvera
Comment options

@theprobugmaker
Comment options

@hanselabreu
Comment options

@j0lvera
Comment options

@hanselabreu
Comment options

Answer selected by theprobugmaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants