Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daniel-le97/nuxt-auth
https://github.com/daniel-le97/nuxt-auth
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/daniel-le97/nuxt-auth
- Owner: daniel-le97
- Created: 2023-02-25T00:09:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T14:33:45.000Z (about 1 year ago)
- Last Synced: 2024-12-09T14:57:55.155Z (about 2 months ago)
- Language: TypeScript
- Size: 164 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nuxt with Local Auth
Simple password based starter made with Nuxt goodies, built-in session, storage layer and composables.
This project uses [Nuxt Extend Layers](https://nuxt.com/docs/getting-started/layers) feature to implement local auth in [`auth`](./auth) directory with a modular approach. This way you can share and reuse your authentication implementation across projects and keep the code clean.
Default database is using built-in key-value storage. You can rewrite it with a custom database by updating [`./auth/server/utils/db.ts`](./auth/server/utils/db.ts)
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more about Nuxt.
## Setup
Make sure to install the dependencies:
```bash
# yarn
yarn install# npm
npm install# pnpm
pnpm install
```Copy `.env.example` to `.env` and provide a secure string for session password.
## Development Server
Start the development server on http://localhost:3000
```bash
npm run dev
```## Production
Build the application for production:
```bash
npm run build
```Locally preview production build:
```bash
npm run preview
```Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
# nuxt-auth