{"id":15013629,"url":"https://github.com/sagargaud01/jwt_authentication_system","last_synced_at":"2026-03-17T15:24:18.065Z","repository":{"id":254423078,"uuid":"846489524","full_name":"SAGARGAUD01/JWT_authentication_system","owner":"SAGARGAUD01","description":"The project will involve creating a microservice for a public API and connecting it to the main service.","archived":false,"fork":false,"pushed_at":"2024-08-23T10:19:42.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T00:17:09.279Z","etag":null,"topics":["node","postman"],"latest_commit_sha":null,"homepage":"","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/SAGARGAUD01.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":"2024-08-23T10:15:23.000Z","updated_at":"2024-08-23T10:24:49.000Z","dependencies_parsed_at":"2024-08-23T11:33:39.864Z","dependency_job_id":"d2e1d00d-186b-4035-8539-310b200432d4","html_url":"https://github.com/SAGARGAUD01/JWT_authentication_system","commit_stats":null,"previous_names":["sagargaud01/jwt_authentication_system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAGARGAUD01%2FJWT_authentication_system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAGARGAUD01%2FJWT_authentication_system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAGARGAUD01%2FJWT_authentication_system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAGARGAUD01%2FJWT_authentication_system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAGARGAUD01","download_url":"https://codeload.github.com/SAGARGAUD01/JWT_authentication_system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243313411,"owners_count":20271178,"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":["node","postman"],"created_at":"2024-09-24T19:44:35.170Z","updated_at":"2025-12-26T16:04:42.608Z","avatar_url":"https://github.com/SAGARGAUD01.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Authentication System with Public API Microservice\n## Project Overview\nThis project demonstrates how to build a JWT (JSON Web Token) authentication system using Node.js. The system is split into two main components:\n\n## Main Service: Handles user authentication and authorization using JWT, manages user registration, login, and candidate information.\nPublic API Microservice: Provides a public API accessible via API keys, allowing access to user profiles and candidate data without traditional email/password authentication.\nFeatures\nUser Authentication and Authorization:\n\nRegister users with hashed passwords.\nLog in users and generate JWT tokens.\nProtect certain routes using JWT authentication.\n## Candidate Management:\n\nAdd candidates to the database, associated with the currently authenticated user.\nRetrieve candidates associated with the logged-in user.\n## Public API Microservice:\n\nProvides access to user profile and candidate information using an API key instead of JWT tokens.\nSecured endpoints accessible via API keys.\n\n## Main Service\nThis service is responsible for handling user authentication and candidate management.\n\nEndpoints\n## User Authentication Endpoints:\n\nPOST /api/register: Register a new user.\nPOST /api/login: Log in an existing user and receive a JWT token.\nPOST /api/protected: Access a protected route (JWT token required).\nCandidate Management Endpoints:\n\nPOST /api/candidate: Add a new candidate (JWT token required).\nGET /api/candidate: Retrieve candidates for the currently authenticated user (JWT token required).\nPublic API Microservice\nThis service provides public access to user profiles and candidate information using API keys.\n\nEndpoints\n## Profile Endpoints:\nPOST /api/public/profile: Retrieve user profile information using an API key.\nCandidate Endpoints:\nGET /api/public/candidate: Retrieve all candidates associated with a user using an API key.\nGetting Started\nPrerequisites\n\u003e Node.js\n\u003e MongoDB\n\n## Future Improvements\nImplement rate-limiting for the Public API.\nAdd API key management (generate, revoke keys).\nImplement logging and monitoring for enhanced observability.\nAdd testing with tools like Jest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagargaud01%2Fjwt_authentication_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagargaud01%2Fjwt_authentication_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagargaud01%2Fjwt_authentication_system/lists"}