Auth.js and Lucia both answer the same question: how do users sign in? The long-running open source auth layer formerly called NextAuth, mostly a thin wrapper around OAuth providers. No longer a library but a reference that teaches you to implement sessions yourself, with code you copy and own. The real split is ownership: Auth.js runs inside your project and leaves the operational work with you, while Lucia runs the hard parts as a service and takes a dependency in exchange.
The real split is ownership: Auth.js runs inside your project and leaves the operational work with you, while Lucia runs the hard parts as a service and takes a dependency in exchange.
| Comparison | Auth.js | Lucia |
|---|---|---|
| Pricing shape | Free and open source. Costs are whatever your identity providers and database charge. | Free. It is documentation, so there is nothing to buy or subscribe to. |
| Frameworks | Next.js, SvelteKit | Next.js, SvelteKit |
| In one line | The long-running open source auth layer formerly called NextAuth, mostly a thin wrapper around OAuth providers. | No longer a library but a reference that teaches you to implement sessions yourself, with code you copy and own. |
Pricing described qualitatively because published plans change often. Checked 2026-08-23. Confirm current terms on Auth.js and Lucia.
Strengths
Tradeoffs
Strengths
Tradeoffs
Neither is better in the abstract. The real split is ownership: Auth.js runs inside your project and leaves the operational work with you, while Lucia runs the hard parts as a service and takes a dependency in exchange. The wrong choice here is usually recoverable, so weight speed of decision over certainty.
Anything past OAuth, like invitations or roles, you design yourself. Callback and adapter APIs have churned across major versions more than once.
Copied code means you carry the maintenance and security review forever. No package upgrades, so fixes only land if you go looking for them.
Usually, at a cost that grows with how much of your product leans on the authentication layer. The sooner you wrap it in your own interface, the cheaper the exit stays.