{"id":26656273,"url":"https://github.com/easycodingtutorial/authenticationsystem","last_synced_at":"2025-10-18T00:20:24.128Z","repository":{"id":277869401,"uuid":"932722904","full_name":"EasyCodingTutorial/AuthenticationSystem","owner":"EasyCodingTutorial","description":"Authentication System Using NextAuth","archived":false,"fork":false,"pushed_at":"2025-02-20T11:57:43.000Z","size":395,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T04:49:22.101Z","etag":null,"topics":["authentication","authenticationsystem","nextauth","nextjs15"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EasyCodingTutorial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"easycodtut","github":["EasyCodingTutorial"]}},"created_at":"2025-02-14T11:58:50.000Z","updated_at":"2025-02-20T11:58:15.000Z","dependencies_parsed_at":"2025-02-16T17:55:28.513Z","dependency_job_id":"98bf336d-7fc5-4436-891d-9812aec7312a","html_url":"https://github.com/EasyCodingTutorial/AuthenticationSystem","commit_stats":null,"previous_names":["easycodingtutorial/authenticationsystem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyCodingTutorial%2FAuthenticationSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyCodingTutorial%2FAuthenticationSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyCodingTutorial%2FAuthenticationSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyCodingTutorial%2FAuthenticationSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyCodingTutorial","download_url":"https://codeload.github.com/EasyCodingTutorial/AuthenticationSystem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245414577,"owners_count":20611373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authenticationsystem","nextauth","nextjs15"],"created_at":"2025-03-25T07:19:22.498Z","updated_at":"2025-10-18T00:20:19.089Z","avatar_url":"https://github.com/EasyCodingTutorial.png","language":"TypeScript","readme":"# Authentication System Using NextAuth \n\n## Overview  \nThis **Authentication System** is built using **Next.js 15** and **TypeScript**, leveraging **NextAuth.js** for secure user authentication with **credentials-based login**. This system provides a robust authentication solution, including hashed password storage, session management, and protected routes.  \n\nThis project is perfect for developers looking to learn or implement **role-based authentication, password security**, and **protected API routes** in their Next.js applications.  \n\n## Technologies Used  \n- **Next.js 14**: A React framework for building server-rendered applications with enhanced performance and SEO.  \n- **TypeScript**: A statically typed superset of JavaScript for better code maintainability.  \n- **bcrypt**: A password-hashing library ensuring user passwords are securely stored.  \n- **MongoDB**: A NoSQL database for storing user data.  \n- **JWT (JSON Web Tokens)**: Secure session management for user authentication.  \n\n## Features  \n✅ **Secure Login System**: Users authenticate using email and password.  \n✅ **Hashed Passwords**: Passwords are securely stored using **bcrypt**.  \n✅ **Session Management**: Authentication handled with **NextAuth.js** and **JWT-based sessions**.  \n✅ **Role-Based Access**: Admin and user roles with protected pages.  \n✅ **API Route Protection**: API endpoints are secured to prevent unauthorized access.  \n✅ **Client \u0026 Server Authentication**: Secure both frontend and backend routes.   \n\n## 🔒 Protected Routes  \nCertain routes are protected based on authentication status and user roles.  \n- **Public Routes**: Anyone can access.  \n- **Protected Routes**: Require user login.  \n- **Admin Routes**: Only accessible by admin users.  \n\n## Installation  \nFollow these steps to set up the project on your local machine:  \n\n\n## Installation  \nTo run this project locally, follow the steps below:  \n\n1. Clone this repository to your local machine:  \n   ```bash  \n   git clone https://github.com/EasyCodingTutorial/AuthenticationSystem.git\n2. Navigate to the project directory:\n   ```bash  \n   cd hulu-clone\n   \n3. Install dependencies:\n   ```bash  \n   npm install\n\n4. Create a .env file in the root directory and add the following configuration:\n    ```bash\n    # NextAuth Configuration  \n     NEXTAUTH_URL=http://localhost:3000  \n     NEXTAUTH_SECRET=your-nextauth-secret-key  \n\n    # MongoDB Connection  \n    MONGODB_URI=your-mongo-db-uri  \n\n   \n5. Start the development server:\n   ```bash  \n    npm run dev  \n   \n6. Open your browser and visit:\n   ```bash  \n    http://localhost:3000\n   ```\n\n\n## How It Works\n   - **User Registration**: Users sign up with an email and password.\n   - **Password Hashing**: User passwords are hashed using bcrypt before storing in the database.\n   - **Login with Credentials**: Users enter their email and password to log in.\n   - **Session Management**: After logging in, NextAuth manages sessions using JWT tokens.\n   - **Protected Routes**: Users can only access certain pages after authentication.\n   - **Role-Based Access**: Admin users can access admin-only routes.\n\n## Known Issues\n   - ❌ **Forgot Password Feature**: Currently not implemented.\n   - ❌ **User Profile Management**: No option for users to update their details.\n\n## Missing Features\n   - Adding a \"Forgot Password\" feature using email-based password resets.\n   - Building a user profile management system.\n\n     If you find more issues or want to contribute, email me at **ecoding45@gmail.com**. Let’s collaborate to make this project better! 🚀\n\n## Contributions\n   Contributions are welcome! If you'd like to add new features or fix issues:\n\n   - Fork the repository.\n   - Create a new branch with your changes.\n   - Submit a pull request.\n\n     \n\n## Learn By Watching Video ▶️\n[![Watch Demo Video](https://img.youtube.com/vi/tyErSg83AWc/maxresdefault.jpg)](https://www.youtube.com/watch?v=tyErSg83AWc)\n\n\n","funding_links":["https://buymeacoffee.com/easycodtut","https://github.com/sponsors/EasyCodingTutorial"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasycodingtutorial%2Fauthenticationsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasycodingtutorial%2Fauthenticationsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasycodingtutorial%2Fauthenticationsystem/lists"}