Skip to content

Authenticate user via AuthJS-SvelteKit and store them in a SQLite database via Prisma.

Notifications You must be signed in to change notification settings

KoljaL/SK-AuthJS

Repository files navigation

SvelteKit + AuthJS example

Authenticate user via AuthJS-SvelteKit and store them in a SQLite database via Prisma.
Did not work right out of the box, but with a little help.

currently not working on vercel, but locally

ToDO

  • connecting SvelteKit, AuthJS and Prisma
  • make protected routes secure via await parent()
  • Authenticate via GitHub OAuth
  • Authenticate via email & password
  • Verification Mail
  • Seed-data aka user, posts, comments, etc

Usage

npm install and reset Prisma

reset Prisma

removes migrations, database-file and starts dev server
bash resetdb.sh

Notes

package.json

do we need this?
prisma-adapter is manually added in lib/server/PrismaAdapter
and next-auth is replaced with @auth/core

"@next-auth/prisma-adapter": "^1.0.5",
"next-auth": "^4.18.6"

About

Authenticate user via AuthJS-SvelteKit and store them in a SQLite database via Prisma.

Resources

Stars

Watchers

Forks