Next.js Discord

Discord Forum

NextAuth + Express.js passport

Unanswered
DollarNavalex posted this in #help-forum
Open in Discord
Hey, i want to setup an auth system using oauth (blizzard one), but i need to authenticate the user for the backend that run on express, with passport setup. How could I setup this ?

3 Replies

have you looked into creating a custom next-auth adapter?
the provider is the means of how user is authenticated. in this case ure using blizzard
but id assume that ud like to access some sort of a backend after authentication.
hence you might want to look into creating a custom adapter
Hmm. Well I was thinking about that because I'm migrating to the new app directory, and at the same time I want to reworks features that was made too fast, like the auth.
But finally, i'll probably keep the way it is for my backend, and I'll create my authGuard in the middleware. Should do the job, and avoid me to learn all this stuff on NextAuth