Skip to content

kesdigital/lucia-auth

 
 

Repository files navigation

Lucia

Thank you for 500 GitHub stars, and counting!

This library is still in beta! While APIs have been relatively stable recently in preparation for v1.0, expect breaking changes

No more hacky workarounds. Make the authentication work for you and your app.

Lucia is a simple yet flexible user and session management library that provides an abstraction layer between your app and your database. It's bare-bones by design, keeping everything easy to use and understand. Get started by reading the introduction page.

Code sample

Working with Lucia looks something like this. In the code below, you're creating a new user with a email/password method, creating a new session, and creating a cookie that you can set it to the user.

const user = await auth.createUser("email", email, {
	password
});
const session = await auth.createSession(user.userId);
const sessionCookie = auth.createSessionCookie(session);

Resources

Documentation

Join the Discord server!

Changelog

CONTRIBUTING.md

Installation

npm i lucia-auth
pnpm add lucia-auth
yarn add lucia-auth

Attributions

This project would not have been possible without our contributors, thank you!

Logo by @dawidmachon, licensed under CC BY-NC-SA 4.0.

About

A simple authentication library for SvelteKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.2%
  • Astro 4.3%
  • Svelte 1.9%
  • JavaScript 1.7%
  • CSS 0.6%
  • HTML 0.2%
  • Shell 0.1%