edwardspresume / sveltekit-lucia-auth-v3-example

This example project showcases how to integrate Lucia V3 for user authentication in a SvelteKit application. User data is stored in a local SQLite database
MIT License
45 stars 4 forks source link

SvelteKit Authentication with Lucia V3: An Example Project

This example project showcases how to integrate Lucia V3 for user authentication in a SvelteKit application. User data is stored in a local SQLite database. The project is split into branches, each demonstrating a different aspect of the authentication process. Each branch builds on top of the previous one, with the last branch being the most comprehensive and up-to-date.

Project Branches

For a guide on how to implement these features, check out the video tutorial series: Lucia Auth V3 with SvelteKit.

Prerequisites

Setup

  1. Install Dependencies: Run the following command to install the project dependencies:

    pnpm install
  2. Environment Variables: Create a .env file in the root directory of the project. Use the .env.example file as a reference.

  3. Database Setup: Run the following commands to set up the database:

    pnpm db:generate
    pnpm db:push
  4. Run the Project: Run the following command to start the development server:

    pnpm dev