Next.js Discord

Discord Forum

Should I use next auth in combination with NodeJS session based auth?

Unanswered
Little yellow ant posted this in #help-forum
Open in Discord
Little yellow antOP
I keep seeing that next auth is good for jwt auth and if I use separate backend for auth, I shouldn't even use next auth.

17 Replies

depends if u want to handle the auth to nextauth since its easier and extendable
@gin nextauth has a express adapter
Little yellow antOP
as I understand it won't even require hitting separate backend to use this auth method?
your backend runs separately on a express server
Little yellow antOP
so what does next auth express adapter? helps in managing sessions?
yes
it keeps track of the session and revalidates it
and it provides u with info
your routes
Little yellow antOP
ahh, okay i will take a look. because i asked AI, and it said i shouldnt use next auth since i just need simple api call on load to get session for client
for important things dont ask ai
its better to read the documentation and ask people who know it
Little yellow antOP
yeah okay, i didnt know next auth had such adapter
thanks fori nfo
np :)