https://github.com/mustofa-id/sveltekit-basic-auth
Basic authentication for SvelteKit, with zero hassle.
https://github.com/mustofa-id/sveltekit-basic-auth
basic-auth lucia-auth sveltekit
Last synced: about 1 month ago
JSON representation
Basic authentication for SvelteKit, with zero hassle.
- Host: GitHub
- URL: https://github.com/mustofa-id/sveltekit-basic-auth
- Owner: mustofa-id
- Created: 2025-11-08T05:41:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-12-31T01:09:20.000Z (about 2 months ago)
- Last Synced: 2026-01-03T22:22:24.189Z (about 2 months ago)
- Topics: basic-auth, lucia-auth, sveltekit
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/sveltekit-basic-auth
- Size: 67.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# 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](https://authjs.dev/), which provides advanced security features, adapters, and wide ecosystem support.
## Usage
```sh
npm install sveltekit-basic-auth
```
See code example in [routes](src/routes) and [hooks.server.ts](src/hooks.server.ts).
## Developing
```sh
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
```sh
npm pack
```
To create a production version of your showcase app:
```sh
npm run build
```
## Publishing
```sh
npm publish
```