Which next auth should I use?
Answered
Oak apple gall wasp posted this in #help-forum
Oak apple gall waspOP
At https://next-auth.js.org/configuration/initialization it says that this package will be replaced by https://authjs.dev/reference/nextjs . But the latter is beta quality apparently.
Which package should I use with a new project?
Is the latter a drop-in replacement?
The former seems to have a lot better documentation.
Essentially I'm using an OICD IDP and need authn to query a backend sending Bearer tokens.
With a react SPA I'd use https://github.com/authts/react-oidc-context which is excellent.
But it's for SPA only so SSR needs something else.
I don't want to spend time later to replace one auth package with another and rewrite stuff.
This could've been a simple chat question, but I'm required to post here.
Which package should I use with a new project?
Is the latter a drop-in replacement?
The former seems to have a lot better documentation.
Essentially I'm using an OICD IDP and need authn to query a backend sending Bearer tokens.
With a react SPA I'd use https://github.com/authts/react-oidc-context which is excellent.
But it's for SPA only so SSR needs something else.
I don't want to spend time later to replace one auth package with another and rewrite stuff.
This could've been a simple chat question, but I'm required to post here.
2 Replies
Cape lion
You should use Auth.js, as it is the new Next-Auth
Answer
Giant panda
Auth.js is well supported and well tested at this point. You shouldn’t run into any issues. Next-auth to auth.js is essentially a rebrand