Skip to content

andriesfilmer/svelte-prisma-jwt-auth

Repository files navigation

SvelteKit Auth with JWT

Related blog post: https://okupter.com/blog/handling-auth-with-jwt-in-sveltekit.

Some changes to work with mysql instead of sqlite.

npm create svelte@latest sveltekit-auth-jwt
npm install prisma
npm install bcryptjs jsonwebtoken @prisma/client
npm install -D @types/bcryptjs @types/jsonwebtoken
npx prisma init --datasource-provider mysql
npx prisma db push
npx prisma generate

Create a .env file in the root.

DATABASE_URL="mysql://pim:some-password@localhost:3306/pim"
JWT_ACCESS_SECRET="some-seed-pass"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published