{"id":22235573,"url":"https://github.com/navaneeth-21/auth_system-mysql-","last_synced_at":"2026-02-12T06:07:21.540Z","repository":{"id":245456215,"uuid":"818305565","full_name":"Navaneeth-21/Auth_system-MYSQL-","owner":"Navaneeth-21","description":"This is an Authentication System for Login and Register Routes which uses json web tokens for authorization .The Application is connected to the Mysql database to store the user details in a structured format.","archived":false,"fork":false,"pushed_at":"2025-03-02T05:53:05.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T06:25:41.976Z","etag":null,"topics":["expressjs","jest","jwt","mysql","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/Navaneeth-21.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-06-21T14:48:20.000Z","updated_at":"2025-03-02T05:53:08.000Z","dependencies_parsed_at":"2024-06-28T19:32:35.782Z","dependency_job_id":"5a44f72f-9c77-4828-873d-95edbc6672c4","html_url":"https://github.com/Navaneeth-21/Auth_system-MYSQL-","commit_stats":null,"previous_names":["navaneethgade07/auth_system","navaneeth-21/auth_system-mysql-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navaneeth-21%2FAuth_system-MYSQL-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navaneeth-21%2FAuth_system-MYSQL-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navaneeth-21%2FAuth_system-MYSQL-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Navaneeth-21%2FAuth_system-MYSQL-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Navaneeth-21","download_url":"https://codeload.github.com/Navaneeth-21/Auth_system-MYSQL-/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245433479,"owners_count":20614487,"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":["expressjs","jest","jwt","mysql","rest-api"],"created_at":"2024-12-03T02:13:45.597Z","updated_at":"2026-02-12T06:07:16.519Z","avatar_url":"https://github.com/Navaneeth-21.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth System with mysql \nA Basic Authentication System with user registration and login functionalities using Node.js , Express and Mysql . \nThis project uses JWT for authenticating the users using tokens\n\n## Features\n - It consists of following RESTful endpoints :\n     - POST /register: Register a new user.\n     - POST /login: Login a user and return a JWT.\n     - GET /profile: Retrieve the logged-in user's profile information (protected endpoint).\n\n\n## Technologies used\n\n- **Backend:** Express.js , MYSQL , JWT , RESTAPI\n- **Testing:** Jest,supertest\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js and npm installed\n- Install MYSQL or MYSQL workbench and create a user\n\n### Installation\n\n1. clone the repository\n2. Install all dependencies.\n3. Create a .env file and enter the following details :\n     - jwt_secret_key\n     - user\n     - host\n     - password\n     - Database name\n4. Run the following SQL commands to set up the database and users table.\n5. Start the application\n\n       npm start\n\n6. Run the following endpoints in postman or any other api requests extensions\n     - Register :\n\n           POST -H \"Content-Type: application/json\" -d '{\"username\":\"testuser\",\"password\":\"testpass\"}' http://localhost:3000/api/auth/register\n\n     - Login :\n\n           POST -H \"Content-Type: application/json\" -d '{\"username\":\"testuser\",\"password\":\"testpass\"}' http://localhost:3000/api/auth/login\n\n    - Access protected route:\n\n          -H \"Authorization\": Bearer \u003cyour_jwt_token\u003e http://localhost:3000/api/auth/protected\n\n## Testing\n  Unit tests are written using jest. To run tests : \n\n    npm test\n    \n\n  \n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavaneeth-21%2Fauth_system-mysql-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavaneeth-21%2Fauth_system-mysql-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavaneeth-21%2Fauth_system-mysql-/lists"}