Skip to content

TazorDE/lucia-sveltekit

 
 

Repository files navigation

Lucia

Join the Discord server!

Lucia is a simple authentication library for SvelteKit that connects your SvelteKit app to your database. It handles the bulk of the authentication process, like creating and validating tokens, but only just enough that you can build on top of it to fit your use case. That said, it isn't (just) a library that create tokens. It uses short-lived tokens, implements rotating refresh tokens, automatically refreshes tokens, and detects refresh token theft. It's goal is to simplify the development process while not being a pain in the ass to customize!

It's important to note that this isn't an out-of-the-box authentication library. It does not validate the user's input, it does not provide UI elements, and it does not provide a OAuth authentication (though it's simple to implement). These are out of the scope of this library and is left up to you. What it does provide is a set of tools for handling authentication, like createUser which saves the user in the database and generate a set of tokens.

This library requires a database to work. If you need a free option, check out Supabase, which Lucia supports out of the box.

Documentation: https://lucia-sveltekit.vercel.app

Installation

npm install lucia-sveltekit

About

A simple authentication library for SvelteKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.2%
  • Svelte 9.6%
  • JavaScript 3.4%
  • Shell 1.1%
  • Other 0.7%