{"id":18278428,"url":"https://github.com/ribborges/api-with-auth","last_synced_at":"2026-04-12T09:02:33.252Z","repository":{"id":253200881,"uuid":"836511729","full_name":"ribborges/api-with-auth","owner":"ribborges","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-15T03:55:20.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T23:16:22.512Z","etag":null,"topics":["api","authentication","express","mongodb","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ribborges.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-08-01T02:28:13.000Z","updated_at":"2024-08-15T03:59:18.000Z","dependencies_parsed_at":"2024-08-15T06:02:26.829Z","dependency_job_id":null,"html_url":"https://github.com/ribborges/api-with-auth","commit_stats":null,"previous_names":["ribborges/api-with-auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ribborges/api-with-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribborges%2Fapi-with-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribborges%2Fapi-with-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribborges%2Fapi-with-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribborges%2Fapi-with-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ribborges","download_url":"https://codeload.github.com/ribborges/api-with-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribborges%2Fapi-with-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31709295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","authentication","express","mongodb","nodejs","typescript"],"created_at":"2024-11-05T12:24:24.498Z","updated_at":"2026-04-12T09:02:33.236Z","avatar_url":"https://github.com/ribborges.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API with Authentication\n\nThis project is a REST API built with TypeScript and Express. It includes authentication features to secure the endpoints.\n\n## Features\n\n- User authentication (login, registration)\n- Protected routes\n- CRUD operations for resources\n- Error handling\n\n## Prerequisites\n\n- Node.js\n- npm\n\n## Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/ribborges/api-with-auth\n    ```\n2. Navigate to the project directory:\n    ```sh\n    cd api-with-auth\n    ```\n3. Install dependencies:\n    ```sh\n    npm install\n    ```\n\n## ENV variables\n\n```sh\n    DB_URI=your_mongodb_uri\n    SECRET=secret_for_password_crypto\n```\n\n## Running the Project\n\n1. Start the development server:\n    ```sh\n    npm run dev\n    ```\n\n## Using the API\n\n### Authentication\n\n- **Register**\n    ```sh\n    POST /auth/register\n    ```\n\n    ***Body***\n    ```json\n    {\n        \"email\": \"example@email.com\",\n        \"password\": \"12345678\",\n        \"username\": \"example\"\n    }\n    ```\n\n- **Login**\n    ```sh\n    POST /auth/login\n    ```\n\n    ***Body***\n    ```json\n    {\n        \"username\": \"example\",\n        \"password\": \"12345678\"\n    }\n    ```\n\n### User management\n\n- **Get all users (Need authentication)**\n    ```sh\n    GET /users\n    ```\n\n- **Delete user (Need authentication and authorization)**\n    ```sh\n    DELETE /users/:id\n    ```\n\n- **Update user (Need authentication and authorization)**\n    ```sh\n    PUT /users/:id\n    ```\n\n    ***Body***\n    ```json\n    {\n        \"username\": \"new_username\"\n    }\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribborges%2Fapi-with-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fribborges%2Fapi-with-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribborges%2Fapi-with-auth/lists"}