New SvelteKit course: fullstacksveltekit.com

Authentication with email and password

Authentication with email and password

Live Demo

Technologies

How to use

First, start by cloning this folder. We will use tiged for cloning subdirectories in Git repositories.

code loading...

Next, install the dependencies:  pnpm i

Duplicate the .env.example file and rename it to .env . Then, add your SQLITE_DB_URL and TURSO_AUTH_TOKEN to the .env file.

There is already a migration file for the database, located in src/lib/server/db/migrations/0000_yummy_eternals.sql . This file is used to create the tables and indexes for the database. You can use this file as a starting point for your migration.

To run the migrations, run the following commands:

code loading...

Now, you can run the application:

code loading...

Open your browser and navigate to http://localhost:5173 . You should see the home page with links to the login and signup pages.

Other Recipes