{"id":21838973,"url":"https://github.com/malekd5/jwt-authentication","last_synced_at":"2026-05-07T20:02:02.346Z","repository":{"id":156561182,"uuid":"555430668","full_name":"MalekD5/jwt-authentication","owner":"MalekD5","description":"JWT Authentication is an express project w/ MongoDB (mongoose).","archived":false,"fork":false,"pushed_at":"2024-09-18T12:02:08.000Z","size":576,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T10:41:38.683Z","etag":null,"topics":["express","jwt","mongoose","refresh-token"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MalekD5.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":"2022-10-21T15:05:06.000Z","updated_at":"2024-09-18T12:02:11.000Z","dependencies_parsed_at":"2025-01-26T10:41:31.826Z","dependency_job_id":null,"html_url":"https://github.com/MalekD5/jwt-authentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekD5%2Fjwt-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekD5%2Fjwt-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekD5%2Fjwt-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekD5%2Fjwt-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MalekD5","download_url":"https://codeload.github.com/MalekD5/jwt-authentication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244819801,"owners_count":20515646,"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":["express","jwt","mongoose","refresh-token"],"created_at":"2024-11-27T21:15:18.298Z","updated_at":"2026-05-07T20:02:02.230Z","avatar_url":"https://github.com/MalekD5.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Authentication (Typescript)\n\nJWT Authentication is an express project w/ MongoDB (mongoose). This project was built as PoC for a blog backend.\n\n**Features:**\n\n- JWT Authentication w/ Refresh Token.\n\n- Protected routes for only authenticated users.\n\n- Role Based routes protection for specific roles.\n\n- auth, logout, refresh, and register routes.\n\n- httpOnly and secure cookies.\n\n- Async CRUD operations using mongoose.\n\n# Compiling\n\nThis project requires to have Mongo database. get your free database from [MongoDB Atlas]([https://www.mongodb.com/atlas/database).\n\n1. clone this repository\n\n```\ngit clone https://github.com/MalekD5/jwt-authentication.git\n```\n\n2. install depedencies\n\n```\nnpm i\n```\n\n3. add your environmental variable to your `.env` file\n\n```\nMONGODB_URL=\nACCESS_TOKEN_SECRET=\nREFRESH_TOKEN_SECRET=\n```\n\nthe `ACCESS_TOKEN_SECRET` and `REFRESH_TOKEN_SECRET` can be anything. for `MONGODB_URL` if you are using atlas, follow [this tutorial](https://www.mongodb.com/docs/guides/atlas/connection-string/) to get your mongodb connection string.\n\n4. run `npm run dev` and happy hacking!\n\n# License\n\nThis project falls under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalekd5%2Fjwt-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalekd5%2Fjwt-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalekd5%2Fjwt-authentication/lists"}