sveltekit-basic-auth Svelte Themes

Sveltekit Basic Auth

Basic authentication for SvelteKit, with zero hassle.

SvelteKit Basic Auth

A lightweight authentication helper library for SvelteKit. Suited for non-critical, low-complexity, or internal environments where lightweight authentication utilities are appropriate.

This library is intentionally minimal, good for quick prototypes, admin tools, or low-complexity apps. For production-grade or large-scale authentication needs, consider a more robust solution such as Auth.js, which provides advanced security features, adapters, and wide ecosystem support.

Usage

npm install sveltekit-basic-auth

See code example in routes and hooks.server.ts.

Developing

npm install

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Everything inside src/lib is part of library, everything inside src/routes can be used as a showcase or preview app.

Building

npm pack

To create a production version of your showcase app:

npm run build

Publishing

npm publish

Top categories

Loading Svelte Themes