HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nextauthjs
next-auth
TypeScript2022–2025
nextauthjs / next-auth

next-auth

Authentication for the Web.

11Distinct people
12Mentions
0Explicit recommenders
28.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Authentication for the Web.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year12 dated mentions

Observed mentions: 2022-12-30 01:54:21 UTC to 2025-09-27 09:10:39 UTC.

0123452022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC514
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303

What Hacker News says

12 sources
> I don’t think it’s great to see a truly free project get absorbed into a commercial venture. Auth.js and NextAuth.js didn't seem to be in a healthy state. Work on NextAuth.js v5 began way back in May 2023.[1][2] NextAuth.js v5 was renamed to Auth.js in August 2023.[3] v5.0.0-beta.0 was released in October 2023.[4] Balázs Orbán, the main contributor to Auth.js and NextAuth.js, quit in January 2025.[5][6] v5 is still in beta after all this time. It never had a stable release. [1] https://github.com/nextauthjs/next-auth/pull/7443 [2] https://github.com/nextauthjs/next-auth/discussions/8487 [3] https://github.com/nextauthjs/next-auth/commit/a996ab57e8ffc... [4] https://www.npmjs.com/package/next-auth/v/5.0.0-beta.0 [5] https://github.com/nextauthjs/next-auth/commits?author=balaz... [6] https://x.com/balazsorban44/status/1943635445235040488
In Auth.js is now part of Better Auth
Does it handle: - Federated sign-in/out? In next-auth, it is a giant pain to implement: https://github.com/nextauthjs/next-auth/discussions/3938 - Automated refreshing of JWT tokens on the client-side? I always end up having to implement my own logic around this. The big problem is if you have multiple API calls going out and they all require JWT auth, you need to check the JWT validity and block the calls until it is refreshed. In next-auth on the server-side, this is impossible to do since that side is generally stateless, and so you end up with multiple refresh calls happening for the same token. - The ability to have multiple auth sessions at once, like in a SaaS app where you might belong to multiple accounts / organizations (your intro paragraph sounds like it does) - Handle how multiple auth sessions are managed if the user happens
Read the rest
to open up multiple tabs and swaps accounts in another tab - Account switching using a Google provider? This seems to be a hard ask for providers like FusionAuth and Cognito. You can't use the Google connector directly but instead use a generic OAuth2 connector where you can specify custom parameters when making the initial OAuth2 flow with Google. The use-case is when a user clicks on the Google sign-in button, it should go to the Google account switcher / selector instead of signing in the user immediately if they have an existing signed-in Google session.
In Launch HN: Better Auth (YC X25) – Authentication Framework for TypeScript
I use authjs (aka next-auth) and recently documented that Google login requests additional access every time the user logs in[1]. I created an issue with a repro, although the maintainers moved it to discussions. It seems that the problem is with Google, but in that case I don't understand why the next-auth example works fine[2]. There are other users affected. If anyone knows how to solve this problem, I would appreciate it if you could say so. https://github.com/nextauthjs/next-auth/discussions/11160 https://next-auth-example.vercel.app/
In Tell HN: Google OAuth consent screen issue could be costing you signups
from time to time config is just not willing to sit there in a list. it needs to be computed. just an example from a few days ago. someone needs to pull data from some remote service (maybe Vault), or generation of keys/entropy/etc. [0][1] of course this just means folks should wrap the whole thing in a program. but that's getting inefficient fast if every layer only accepts "env vars" or a plain JSON file. [0] https://github.com/nextauthjs/next-auth/pull/9638#issuecomme... [1] https://github.com/nextauthjs/next-auth/pull/9638#issuecomme...
In Some packages are no longer installable after test command is removed
I can't recommend enough Zitadel and its OIDC library. Code is very well-writen and informative. Highly encourage everyone jump into source code and explore how IntrospectionResponse struct work with all related code around https://github.com/zitadel/oidc/blob/main/pkg/oidc/introspec... // IntrospectionResponse implements RFC 7662, section 2.2 and // OpenID Connect Core 1.0, section 5.1 (UserInfo). // https://www.rfc-editor.org/rfc/rfc7662.html#section-2.2. // https://openid.net/specs/openid-connect-core-1_0.html#Standa.... type IntrospectionResponse struct { Active Scope ClientID TokenType ... exp iat nbf sub Audience ... aud ... JWTID ... Claims map[string]any } If you want to explore the difference between identity providers, click through https://github.com/nextauthjs/next-auth/tree/main/packages/c... Azure is the most
Read the rest
insane ... and it's a lot of fun to compare them all against each other. Next go though PKCE (Proof Key for Code Exchange) and look how code_challenge, code_verifier works or at least see interfaces . Ory Fosite is a great alternative too https://github.com/ory/fosite Support PKCE #59835 in x/oauth2 https://github.com/golang/go/issues/59835 Scott Brady's content is great for undetstanding the topic SPA Identity and Access Control with OpenID Connect https://www.youtube.com/watch?v=rP3St0GU_Bk OAuth is Not Authentication https://www.scottbrady91.com/oauth/oauth-is-not-authenticati... SPA is a landmine .. OAuth 2 0 and OpenID Connect for Single Page Applications Philippe De Ryck https://www.youtube.com/watch?v=XoBtUn4XczU The deeper you go into the topic the more you will discover. It's an ultimate "rabbit hole" - web, native, SPA flows, PKCE, JWT, session storage, custome middleware for your favorite flavor of backend framework, etc
In Easy to use OpenID Connect client and server library written for Go
It is definitely fairly easy to get started with and supports a wide range of authenticators (at least next-auth does, authjs not so many at the moment). The work on next-auth has been stopped in favour of this (also after some issues and rollback [1]). One thing I was pleasantly surprised by was how easy it is too rollout email authentication via magic links and how relatively good it looks/behaves out of the box [2]. All you need is to add SMTP url and add the config. It is also worth noting that it doesn't work for nextjs yet. [1]: https://github.com/nextauthjs/next-auth/pull/6132 [2]: https://aihelperbot.com/signin Edit: Formatting.
In Auth.js Authentication for the Web
I went down the rabbithole of using next-auth (now authjs) for a recent project. Having used Passport.js [1] for Oauth2 the last time I was doing node.js ~3 years ago, I found this library to have many footguns as comments/answers on SO and Github. Seems like many people are trying to shoehorn their codebase [2] (!!) to make it work with the way the library manages sign-in flow, redirects, cookies, logout, etc. [3] These were solved problems in the MEAN stack era with middlewares, but now that Next.js/react is the trend, people are doing everything they can to make it work - from relaxing security configs, to stashing things in the JWT just so some callback can get an additional piece of data [4]. [1] https://github.com/jaredhanson/passport [2] https://github.com/nextauthjs/next-auth/issues/600#issuecomm... [3] https://stackoverflow.com/q
Read the rest
In Auth.js Authentication for the Web

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.