{"id":22680169,"url":"https://github.com/coderooz/auth-api","last_synced_at":"2025-07-29T20:39:54.174Z","repository":{"id":248800817,"uuid":"829822272","full_name":"coderooz/auth-api","owner":"coderooz","description":"This is a basic authentication API using Node.js, Express, and JSON Web Tokens (JWT). The API supports user registration, login, and access to protected routes.","archived":false,"fork":false,"pushed_at":"2024-07-17T04:21:29.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T09:04:42.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/coderooz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-07-17T04:20:47.000Z","updated_at":"2024-07-17T04:21:32.000Z","dependencies_parsed_at":"2024-07-17T07:00:05.199Z","dependency_job_id":null,"html_url":"https://github.com/coderooz/auth-api","commit_stats":null,"previous_names":["coderooz/auth-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderooz/auth-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fauth-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fauth-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fauth-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fauth-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderooz","download_url":"https://codeload.github.com/coderooz/auth-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fauth-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267755472,"owners_count":24139450,"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-07-29T02:00:12.549Z","response_time":2574,"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":[],"created_at":"2024-12-09T19:12:36.094Z","updated_at":"2025-07-29T20:39:54.109Z","avatar_url":"https://github.com/coderooz.png","language":"JavaScript","readme":"# Basic Authentication API\r\n\r\nThis is a basic authentication API using Node.js, Express, and JSON Web Tokens (JWT). The API supports user registration, login, and access to protected routes.\r\n\r\n## Getting Started\r\n\r\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\r\n\r\n### Prerequisites\r\n\r\nYou need to have Node.js and npm installed on your local machine.\r\n\r\n- [Node.js](https://nodejs.org/)\r\n- [npm](https://www.npmjs.com/)\r\n\r\n### Installing\r\n\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/coderooz/auth-api.git\r\n   cd auth-api\r\n   ```\r\n\r\n2. Install the dependencies:\r\n   ```bash\r\n   npm install express bcryptjs jsonwebtoken body-parser\r\n   ```\r\n\r\n3. Start the server:\r\n   ```bash\r\n   node index.js\r\n   ```\r\n\r\n### API Endpoints\r\n\r\n- **Register a new user**\r\n  - `POST /register`\r\n  - Request body: `{ \"username\": \"john_doe\", \"password\": \"your_password\" }`\r\n\r\n- **Login a user**\r\n  - `POST /login`\r\n  - Request body: `{ \"username\": \"john_doe\", \"password\": \"your_password\" }`\r\n\r\n- **Access protected route**\r\n  - `GET /me`\r\n  - Headers: `{ \"x-access-token\": \"your_jwt_token\" }`\r\n\r\n### Usage\r\n\r\nUse a tool like Postman or cURL to interact with the API endpoints.\r\n\r\n### Built With\r\n\r\n- [Express](https://expressjs.com/) - The web framework used\r\n- [bcryptjs](https://www.npmjs.com/package/bcryptjs) - To hash passwords\r\n- [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken) - For JWT authentication\r\n\r\n### Contributing\r\n\r\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\r\n\r\n### Versioning\r\n\r\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/coderooz/auth-api/tags).\r\n\r\n### Authors\r\n\r\n- **Ranit Saha** - *Initial work* - [Coderooz](https://github.com/your-username)\r\n\r\n### License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fauth-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderooz%2Fauth-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fauth-api/lists"}