Next.js Discord

Discord Forum

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

Unanswered
Wool sower gall maker posted this in #help-forum
Open in Discord
Wool sower gall makerOP
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
Wool sower gall makerOP
as I understand it won't even require hitting separate backend to use this auth method?
your backend runs separately on a express server
Wool sower gall makerOP
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
Wool sower gall makerOP
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
Wool sower gall makerOP
yeah okay, i didnt know next auth had such adapter
thanks fori nfo
np :)