#Which next auth should I use?

4 messages · Page 1 of 1 (latest)

carmine skiff
#

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.

The main entry point of NextAuth.js is the NextAuth method that you import from next-auth. It handles different types of requests, as defined in the REST API section.

GitHub

Lightweight auth library based on oidc-client-ts for React single page applications (SPA). Support for hooks and higher-order components (HOC). - authts/react-oidc-context

wild tapirBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

dim pilot
marsh crypt
#

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