A web application built with Next.js 14, featuring a robust set of authentication and user management functionalities. It enables users to register either through traditional email and password or via Google authentication. The application employs a MongoDB database to securely store user registration data.
Server actions are used to implement api. Email verification and forgot password functionalities are also implemented using Resend and node mailer. It's a comprehensive application allowing user to register and login with ease. Error handling is implemented with Sonner for toast notifications.
- Users can register with their email and password.
- Email verification is implemented for added security.
- Verification emails are sent using Node Mailer and Resend.
- Users can reset their password using the "Forgot Password" feature.
- Password reset links are sent to the user's email and changes are reflected in DB in realtime.
- Users can register or log in using Google authentication.
- Integration with Google OAuth for a seamless user experience.
- Developed with Next.js 14.
- Utilizes the Next.js App Router for efficient client-side navigation.
- User registration data is stored in MongoDB.
- Passwords and sensitive information are securely hashed.
- Styling is done using Tailwind CSS for a responsive and clean UI.
- New users are redirected to an intermediate page after authentication.
- Provides a smooth onboarding experience.
-
Clone the repository:
git clone https://github.com/iavinash73/next-auth.git
-
Install required packages:
npm i
-
Get the .env variables necessary for the project:
MONGODB_URI= NEXTAUTH_SECRET= GOOGLE_ID= GOOGLE_SECRET= NEXTAUTH_URL= RESEND_API_KEY=
-
Run the project in local:
npm run dev
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.