Overview
The Nuxt Auth is a comprehensive solution for handling authentication in Nuxt 3 projects. It provides features such as email/password authentication, email verification and password reset flows, OAuth login with platforms like Google and Github, route middleware protection, and more. It is database agnostic and offers various composables for managing authentication operations. The theme also supports custom claims, customizable email templates, user session management, and deployment on platforms like Vercel, Netlify, and Cloudflare.
Features
- Email/password authentication: Users can authenticate using their email and password.
- Email verification & password reset flows: The theme allows for email verification and password reset functionalities.
- OAuth login: Users can log in using their accounts from platforms like Google and Github.
- Route middleware protection: Routes can be protected using middleware to ensure authorized access.
- Database agnostic: The theme is built on Prisma and can work with any database.
- Auth operations via useAuth composable: The useAuth composable provides various functions for performing authentication operations.
- Auto refresh of access token via useAuthFetch composable: The useAuthFetch composable automatically refreshes the access token to maintain user sessions.
- Add dynamic custom claims to access token: Custom claims can be added to the access token to provide additional information.
- Customizable email templates: The email templates used for verification and password reset can be customized.
- User session management via useAuthSession composable: The useAuthSession composable manages user sessions.
- Edge deployment on Vercel, Netlify, Cloudflare: The theme can be easily deployed on platforms like Vercel, Netlify, and Cloudflare.
Installation
To install the Nuxt Auth theme, follow these steps:
- Add the
@bg-dev/nuxt-auth
dependency to your project. - Refer to the documentation website for detailed installation instructions and examples.
- Optionally, you can check the demo running on different edge workers like Vercel, Netlify, and Cloudflare.
Summary
Nuxt Auth is a powerful solution for handling authentication in Nuxt 3 projects. With features like email/password authentication, OAuth login, route protection, and customizable email templates, it provides a comprehensive authentication system. The theme is database agnostic, supports custom claims, and offers user session management. It can be easily deployed on platforms like Vercel, Netlify, and Cloudflare. To get started, add the @bg-dev/nuxt-auth
dependency to your project and refer to the documentation for installation instructions.