Welcome to AuthGuardian, your go-to platform for secure user authentication and interaction. This Next.js web application allows users to sign up, log in, and view their details. AuthGuardian also provides a mechanism for users to verify their accounts, ensuring a secure and trustworthy environment.
-
User Authentication: Sign up and log in securely to access your personalized account.
-
Profile Details: View your details, including name, email, verification status, and account creation date.
-
User Verification: Verify your account by clicking on the "Verify" button in the navbar. An email with a verification link will be sent to your registered email address.
-
User Table: Once verified, access the / route to view a table containing details of other users, such as name, email, verification status, and account creation date.
-
Logout: Safely log out of your account with the "Logout" button in the navbar.
-
Delete Account: Permanently delete your account by clicking on the "Delete Account" button below your profile details. A confirmation modal will appear before the account deletion.
-
Dark Mode/Light Mode: Switch between dark and light modes using the radio buttons in the navbar for a personalized experience.
-
Notifications: Utilizing React Toastify for better notification handling throughout the application.
-
Access Token: Upon successful login, an access token is generated and stored in a cookie with a one-hour expiry time.
-
JWT Token: Passwords are securely encoded using JWT tokens.
-
Token Expiry Check: APIs perform checks on the access token's expiry, notifying users via React Toastify if it has expired.
-
User Verification: Verification emails are sent to users with a verification link. The link contains a verification token, which is decoded and validated on the /verify route.
-
Tailwind CSS: A utility-first CSS framework for creating responsive and efficient designs.
-
Next.js: A React framework for building server-rendered and statically generated web applications.
-
MongoDB: A NoSQL database used for storing user data securely.
-
Clone the repository.
-
Install dependencies using
npm install
. -
Create a
.env
file at the root of the project. -
Add the following variables to your
.env
file:MONGODB_URI=your_mongodb_uri JWT_TOKEN=your_jwt_secret GMAIL_ID=your_gmail_id GMAIL_TOKEN=your_appkey_token
-
Run the application using
npm run dev
.
Make sure to replace your_mongodb_uri
, your_jwt_secret
, your_gmail_id
, and your_appkey_token
with your actual MongoDB URI, JWT secret, Gmail ID, and Gmail token, respectively. Users should follow the instructions carefully to set up the environment variables needed for the application to function correctly.
If you encounter any issues, have questions, or need assistance, please feel free to contact me. Your feedback is valuable, and I'm here to help!
Feel free to explore, contribute, and make AuthGuardian even better!