Skip to content

damien-hl/nuxt3-auth-example

Repository files navigation

Nuxt 3 Auth example

This application is a simple example of how to implement a local authentication system using Nuxt.

Cover

Features

  • 🔐 Login with email and password
  • 🛡️ Guest, private and admin only pages
  • 🔥 Keep user authenticated after page refresh

Setup

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

# pnpm
pnpm install --shamefully-hoist

Copy the .env.example file to .env and fill in the values.

cp .env.example .env

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Checkout the deployment documentation for more information.

Credits