{"id":24103189,"url":"https://github.com/aneathaarse/backend-authentication","last_synced_at":"2026-04-29T16:39:17.937Z","repository":{"id":270964055,"uuid":"911981362","full_name":"AneathaaRse/Backend-Authentication","owner":"AneathaaRse","description":"password reset","archived":false,"fork":false,"pushed_at":"2025-02-09T19:34:51.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T05:35:52.967Z","etag":null,"topics":["bcrypt","cors","dotenv","express","javascript","jsonwebtoken"],"latest_commit_sha":null,"homepage":"https://backend-authentication-2.onrender.com","language":"JavaScript","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/AneathaaRse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-01-04T11:24:31.000Z","updated_at":"2025-02-09T19:34:54.000Z","dependencies_parsed_at":"2025-02-09T20:24:35.877Z","dependency_job_id":"f59aba09-aafb-465c-8bb0-074acf146b7b","html_url":"https://github.com/AneathaaRse/Backend-Authentication","commit_stats":null,"previous_names":["aneathaarse/backend-authentication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AneathaaRse/Backend-Authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AneathaaRse%2FBackend-Authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AneathaaRse%2FBackend-Authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AneathaaRse%2FBackend-Authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AneathaaRse%2FBackend-Authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AneathaaRse","download_url":"https://codeload.github.com/AneathaaRse/Backend-Authentication/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AneathaaRse%2FBackend-Authentication/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268424029,"owners_count":24248119,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bcrypt","cors","dotenv","express","javascript","jsonwebtoken"],"created_at":"2025-01-10T19:04:27.110Z","updated_at":"2026-04-29T16:39:17.890Z","avatar_url":"https://github.com/AneathaaRse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Reset System\nThis project implements a complete Password Reset Flow using Node.js, Express.js, MongoDB, and React. It provides a seamless and secure user experience for resetting passwords.\n\n## Features\n. User Registration and Login functionality.\n. Forgot Password feature with email verification.\n. Secure Password Reset Flow with token validation.\n. Frontend built using React and styled with Bootstrap.\n\n# Project Workflow\n\n## 1. Forget Password Page\n\n   Users enter their registered email address on the Forget Password page.\n   \n## 2. Check User Existence\n. Backend verifies if the email exists in the database:\n. If user is not found: Returns an error message.\n. If user exists: A secure random string is generated.\n\n## 3. Send Reset Link\n. The random string is stored in the database.\n. A reset link containing the string is emailed to the user.\n\n## 4. User Clicks Link\n The reset link redirects the user to the Password Reset Page on the frontend.\n \n## 5. Validate Reset Token\n. Backend verifies the random string from the reset link:\n. If valid: Displays a form to enter a new password.\n. If invalid/expired: Displays an error message.\n\n## 6. Password Reset\n. User submits the new password.\n. Backend securely updates the password in the database.\n. Success: User can now log in with their new password\n\n# Technical Specifications\n## Frontend\n. Framework: React.js\n. Styling: Bootstrap\n\nFeatures:\n. User-friendly forms for Forget Password and Reset Password flows.\n## Backend\n. Framework: Node.js with Express.js\n. Database: MongoDB with Mongoose\n## Libraries Used:\n. bcrypt: Password hashing.\n. jsonwebtoken: Token-based authentication.\n. nodemailer: Sending emails.\n. crypto: Generating secure random strings.\n\n# Prerequisites\nEnsure the following are installed:\n\n. Node.js (v14+)\n. MongoDB (local or cloud instance)\n. React.js (for frontend development)\n. Postman or cURL (for API testing)\n\n# API Endpoints\n1. User Registration\n =\u003e Endpoint: POST /api/auth/register\n =\u003e Description: Registers a new user.\n\n2. User Login\n =\u003e Endpoint: POST /api/auth/login\n =\u003e Description: Logs in an existing user.\n\n3. Forgot Password\n =\u003e Endpoint: POST /api/auth/forgot-password\n =\u003e Description: Sends a password reset link to the user's email.\n\n4. Reset Password\n =\u003e Endpoint: POST /api/auth/reset-password/:id/:randomString\n =\u003e Description: Updates the user's password.\n\n# Postman Collection \nhttps://documenter.getpostman.com/view/39168679/2sAYJ99xuM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneathaarse%2Fbackend-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneathaarse%2Fbackend-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneathaarse%2Fbackend-authentication/lists"}