Yuki UIYuki UI

Auth

A flexible, lightweight authentication library for building custom authentication systems.

Auth is a flexible, lightweight authentication library inspired by Lucia Auth, designed for developers who want to build secure, custom authentication systems from the ground up.

Overview

Auth provides the core building blocks for authentication without dictating your database schema, user flows, or framework choices. It gives you:

  • Framework Agnostic: Works with any JavaScript framework
  • Database Agnostic: Adapters for popular databases with a simple interface to write your own
  • Typed: First-class TypeScript support
  • Session Management: Secure, stateful sessions
  • OAuth: Simple integration with OAuth providers
  • Minimal Dependencies: Lightweight core with modular extensions

Key Concepts

Authentication vs. Authorization

  • Authentication: Verifying who the user is (Auth's primary focus)
  • Authorization: Determining what the user can do (built on top of Auth)

Sessions

Auth uses secure, stateful sessions stored in your database:

  • Session tokens are sent as HTTP-only cookies
  • Each session is linked to a specific user
  • Sessions can be invalidated individually or globally for a user

References

  1. Learn more about building your own authentication system with Lucia Auth
  2. Example projects: