GithubHelp home page GithubHelp logo

marklofff / lucia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucia-auth/lucia

0.0 1.0 0.0 2.56 MB

Authentication, simple and clean

Home Page: https://lucia-auth.com

License: MIT License

JavaScript 2.20% TypeScript 82.00% CSS 0.48% HTML 0.29% Svelte 4.58% Astro 10.46%

lucia's Introduction

Lucia

Lucia is a simple and 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({
	primaryKey: {
		providerId: "email",
		providerUserId: email,
		password
	},
	attributes: {
		email,
		username
	}
});
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.

lucia's People

Contributors

pilcrowonpaper avatar adriangonz97 avatar v-rogg avatar lucythecat avatar blastose avatar skepticmystic avatar dawidmachon avatar faeyumbrea avatar tazorde avatar ffss92 avatar jings avatar danawoodman avatar zach-hopkins avatar parables avatar oscartbeaumont avatar jouandeag avatar biscuitech avatar crisfole avatar captaindirgo avatar ap-1 avatar alex-way avatar weepy avatar moka-ayumu avatar voiceofsoftware avatar taslater avatar rogadev avatar oskar-gmerek avatar benocxx avatar m4rvr avatar leovoon avatar

Watchers

 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.