sveltekit-auth Svelte Themes

Sveltekit Auth

SvelteKit template using my library PrismaAuth.js to handle registration. Uses Prisma, and SQLite3(changeable) for data storing. Comes with login, registration, and a sign-out page built with Shadcn-svelte.

SvelteKit Authentication Template

Built with Prisma, PrismaAuth.js, SvelteKit, shadcn-svelte, and more.

Configuration

1. Set the random JWT token key in the .env file in the root directory like so:

DATABASE_URL="file:./dev.db"
JWT_SECRET="RANDOMLY_GENERATED_STRING"

3. Inside the src/lib/isDev.ts file change the url to the appropriate domain like so:

export let url = isDev ? 'http://localhost:5173' : 'https://url.com'; // Change this to your own url

Notes

1. The database is interchangeable. You can use SQLite3, MySQL, PostgreSQL with Vercel, etc. As long as Prisma supports it, the template supports it.

Top categories

Loading Svelte Themes