{"id":28175386,"url":"https://github.com/thisiskhizar/node-auth-system","last_synced_at":"2026-04-12T02:33:45.504Z","repository":{"id":284023523,"uuid":"953583069","full_name":"thisiskhizar/node-auth-system","owner":"thisiskhizar","description":"A secure, reusable Node.js auth system with email verification and JWT support.","archived":false,"fork":false,"pushed_at":"2025-04-01T19:46:22.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T23:14:02.310Z","etag":null,"topics":["auth-system","authentication","express","jwt","mongodb","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thisiskhizar.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-03-23T17:36:48.000Z","updated_at":"2025-04-01T19:46:26.000Z","dependencies_parsed_at":"2025-03-23T18:44:52.978Z","dependency_job_id":null,"html_url":"https://github.com/thisiskhizar/node-auth-system","commit_stats":null,"previous_names":["thisiskhizar/node-auth-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thisiskhizar/node-auth-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisiskhizar%2Fnode-auth-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisiskhizar%2Fnode-auth-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisiskhizar%2Fnode-auth-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisiskhizar%2Fnode-auth-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisiskhizar","download_url":"https://codeload.github.com/thisiskhizar/node-auth-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisiskhizar%2Fnode-auth-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"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":["auth-system","authentication","express","jwt","mongodb","nodejs","rest-api"],"created_at":"2025-05-15T23:14:00.503Z","updated_at":"2026-04-12T02:33:45.482Z","avatar_url":"https://github.com/thisiskhizar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Auth System\n\nA reusable and secure Node.js authentication system using Express, JWT, and MongoDB.\n\n![Project Banner](./auth-hero-image.jpg)\n\n## Features\n\n- Email verification (via token or code)\n- Login with access and refresh tokens\n- Token refresh and logout\n- Password reset via email\n- Middleware-protected routes\n\n## Tech Stack\n\n- Node.js + Express\n- MongoDB + Mongoose\n- JWT, bcrypt, cookie-parser\n- dotenv, helmet, cors, morgan\n\n## Installation\n\n```bash\n# Clone the repo\ngit clone https://github.com/your-username/node-auth-system.git\ncd node-auth-system\n\n# Install dependencies\nnpm install\n\n# Setup environment variables\ncp .env.example .env\n# Fill in the required values in .env\n\n# Start the dev server\nnpm run dev\n```\n\n## API Endpoints\n\nAll endpoints are prefixed with: `/api/v1/auth`\n\n| Method | Endpoint             | Description                          |\n|--------|----------------------|--------------------------------------|\n| POST   | `/register`          | Register new user                    |\n| GET    | `/verify/:token`     | Verify email via token               |\n| POST   | `/verify-code`       | Verify email via 6-digit code        |\n| POST   | `/login`             | Login and receive tokens             |\n| POST   | `/refresh-token`     | Refresh JWT access token             |\n| POST   | `/logout`            | Logout and clear refresh token       |\n| POST   | `/forgot-password`   | Request password reset               |\n| POST   | `/reset-password/:token` | Reset password using token       |\n| GET    | `/check-auth`        | Protected route — returns user info |\n\n## Customization\n\n- Plug into any frontend — React, Vue, mobile, etc.\n- Hook up your preferred email provider in `mail.service.js`\n- Extend user model or controller logic as needed\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisiskhizar%2Fnode-auth-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisiskhizar%2Fnode-auth-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisiskhizar%2Fnode-auth-system/lists"}