{"id":19610626,"url":"https://github.com/douaaaaa/jwt-authentication","last_synced_at":"2026-04-09T16:02:41.948Z","repository":{"id":252805595,"uuid":"841503234","full_name":"douaaaaa/jwt-authentication","owner":"douaaaaa","description":"JWT Authentication with Node.js, Express, and MongoDB","archived":false,"fork":false,"pushed_at":"2024-08-12T15:03:32.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T10:03:13.855Z","etag":null,"topics":["api","authentication","cookies","expressjs","javascript","jwt","mongodb","nodejs"],"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/douaaaaa.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-12T14:34:47.000Z","updated_at":"2024-08-12T17:01:20.000Z","dependencies_parsed_at":"2024-08-12T17:38:33.277Z","dependency_job_id":null,"html_url":"https://github.com/douaaaaa/jwt-authentication","commit_stats":null,"previous_names":["douaaaaa/jwt-authentication"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douaaaaa%2Fjwt-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douaaaaa%2Fjwt-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douaaaaa%2Fjwt-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douaaaaa%2Fjwt-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douaaaaa","download_url":"https://codeload.github.com/douaaaaa/jwt-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240898997,"owners_count":19875293,"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":["api","authentication","cookies","expressjs","javascript","jwt","mongodb","nodejs"],"created_at":"2024-11-11T10:31:11.862Z","updated_at":"2026-04-09T16:02:41.898Z","avatar_url":"https://github.com/douaaaaa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Authentication with Node.js, Express, and MongoDB\n\n### Overview\nThis project provides a robust authentication system using JSON Web Tokens (JWT) with Node.js, Express, and MongoDB. It allows users to register, log in, log out, and manage their profiles securely.\n\n### Features\n- User Registration: Create new user accounts.\n- User Login: Authenticate users and issue JWTs.\n- User Logout: Invalidate the user's session by clearing the JWT.\n- Profile Management: Retrieve and update user profile information.\n\n### API Endpoints:\n- POST /api/user: Register a new user.\n- POST /api/user/log-in: Authenticate and log in a user.\n- POST /api/user/log-out: End the user session and log out.\n- GET /api/user/profile: Retrieve the current user’s profile data.\n- PUT /api/user/profile: Update the user’s profile information.\n\n### Installation\n1. Clone the Repository:\n```\n  git clone https://github.com/douaaaaa/jwt-authentication\n```\n2. Navigate to the Project Directory:\n```\n  cd jwt-authentication\n```\n3. Install Dependencies:\n```\n  npm install\n```\n4. Set Up Environment Variables:\n```\n  MONGO = \u003cyour_mongodb_uri\u003e\n  PORT = \u003cport\u003e\n  JWT_SECRET = \u003cyour_jwt_secret\u003e\n```\n5. Start the Server:\n```\n  npm run dev\n```\n\n### Dependencies\n- bcryptjs\n- cookie-parser\n- dotenv\n- express\n- express-async-handler\n- jsonwebtoken\n- mongoose\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouaaaaa%2Fjwt-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouaaaaa%2Fjwt-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouaaaaa%2Fjwt-authentication/lists"}