Lucia is an auth library written in TypeScript that abstracts away the complexity of handling sessions. It works alongside your database to provide an API that's easy to use, understand, and extend.

  • No more endless configuration and callbacks
  • Fully typed
  • Works in any runtime - Node.js, Bun, Deno, Cloudflare Workers
  • Extensive database support out of the box
import { Lucia } from "lucia";

const lucia = new Lucia(new Adapter(db));

const session = await lucia.createSession(userId, {});
await lucia.validateSession(;

Lucia is an open source library released under the MIT license, with the help of 100+ contributors!



Join the Discord server!




npm i lucia
pnpm add lucia
yarn add lucia

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes