Code Monkey home page Code Monkey logo

lucia-auth's Introduction

Lucia

Join the Discord server!

Thank you for 500 GitHub stars, and counting!

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. Lucia is the authentication solution that works with you and your app. Get started by reading the introduction page.

At its core, it makes managing users and sessions easy, and it doesn’t attempt to do anything more than that. It’s not an out-of-the-box library like NextAuth, nor an auth platform like Firebase, and that is a super important distinction. You will need to use your own database and strategies like OAuth has to be implemented by yourself (or use one of our integration packages). However, once you understand the basics of Lucia and authentication, it allows you to fully control and customize your authentication.

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)

Documentation

Documentation

Changelog

Installation

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

Contributing

CONTRIBUTING.md

lucia-auth's People

Contributors

pilcrowonpaper avatar adriangonz97 avatar blastose avatar skepticmystic avatar dawidmachon avatar faeyumbrea avatar tazorde avatar danawoodman avatar zach-hopkins avatar parables avatar jouandeag avatar biscuitech avatar crisfole avatar captaindirgo avatar alex-way avatar fabianmerino avatar jordancalhoun avatar leovoon avatar oskar-gmerek avatar rogadev avatar taslater avatar voiceofsoftware avatar weepy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.