Learn how to implement session management and user sign-in from scratch for a JavaScript web app without relying on a third-party library
Use the Oslo utility packages for cryptography and session tokens as small focused building blocks in your own auth layer
Integrate the Arctic OAuth 2.0 client to add Google or GitHub sign-in to an app while keeping full control of session handling
No library to install, read the guides at lucia-auth.com and implement session authentication yourself using your chosen database and framework.
Lucia started as an authentication library for JavaScript and TypeScript applications, but has since changed direction. As of early 2025, the library version (v3) is deprecated and the project now serves as a learning resource rather than installable software. Authentication is the part of a web application that handles user sign-in, sessions, and identity. Rather than providing code you install as a dependency, the Lucia project now teaches developers how to implement these features themselves from scratch. The site at lucia-auth.com walks through building session management using your own database, framework, and libraries of choice. The reason the project moved away from being a library is explained in the README: the authors found it very difficult to build a single library that works well across the many database systems, web frameworks, runtimes, and deployment environments that JavaScript developers use. They concluded it is more practical to teach the underlying concepts and a straightforward implementation that each developer can then adapt to their specific setup. Related projects are linked from the repository. The Copenhagen Book is a free online guide covering web application authentication concepts broadly. Oslo is a set of small, focused utility packages for authentication and cryptography. Arctic is an OAuth 2.0 client library, which handles the flow for signing in users through third-party providers like Google or GitHub. Developers who were using Lucia v3 are directed to the announcement post for migration guidance. The source code for v3 remains available on a separate branch.
← lucia-auth on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.