This is very basic example implementation of using Nuxt Auth Utils to perform authentication. This example includes, registration, login, logout, and route protection to prevent unauthorized users from accessing specific content and routes. The home page is public, while the user list and detail pages requires that users be logged in to see the content.
This example uses Drizzle as a database ORM to store user information in a database.
Register a new user, then log in to see the user list and details.
Make sure to install the dependencies:
# pnpm
pnpm install
Copy .env.example
to .env
and configure the environment variables.
Run the Drizzle migrations:
pnpm drizzle-run-migrations
Start the development server on http://localhost:3000
:
pnpm run dev