{"id":13403847,"url":"https://github.com/techiediaries/fake-api-jwt-json-server","last_synced_at":"2025-04-06T02:08:21.704Z","repository":{"id":30208333,"uuid":"117586629","full_name":"techiediaries/fake-api-jwt-json-server","owner":"techiediaries","description":"A Fake API with JWT Authentication using json-server and jsonwebtoken","archived":false,"fork":false,"pushed_at":"2022-12-22T05:51:40.000Z","size":97,"stargazers_count":286,"open_issues_count":19,"forks_count":217,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-07-31T19:42:16.837Z","etag":null,"topics":["faker","json-server","jsonwebtoken","jwt","jwt-authentication"],"latest_commit_sha":null,"homepage":null,"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/techiediaries.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}},"created_at":"2018-01-15T19:29:07.000Z","updated_at":"2024-07-30T13:44:34.000Z","dependencies_parsed_at":"2023-01-14T16:32:30.144Z","dependency_job_id":null,"html_url":"https://github.com/techiediaries/fake-api-jwt-json-server","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/techiediaries%2Ffake-api-jwt-json-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiediaries%2Ffake-api-jwt-json-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiediaries%2Ffake-api-jwt-json-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiediaries%2Ffake-api-jwt-json-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techiediaries","download_url":"https://codeload.github.com/techiediaries/fake-api-jwt-json-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423514,"owners_count":20936626,"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":["faker","json-server","jsonwebtoken","jwt","jwt-authentication"],"created_at":"2024-07-30T19:01:35.410Z","updated_at":"2025-04-06T02:08:21.688Z","avatar_url":"https://github.com/techiediaries.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# JSONServer + JWT Auth\n\nA Fake REST API using json-server with JWT authentication. \n\nImplemented End-points: login,register\n\n## Install\n\n```bash\n$ npm install\n$ npm run start-auth\n```\n\nMight need to run\n```\nnpm audit fix\n```\n\n## How to login/register?\n\nYou can login/register by sending a POST request to\n\n```\nPOST http://localhost:8000/auth/login\nPOST http://localhost:8000/auth/register\n```\nwith the following data \n\n```\n{\n  \"email\": \"nilson@email.com\",\n  \"password\":\"nilson\"\n}\n```\n\nYou should receive an access token with the following format \n\n```\n{\n   \"access_token\": \"\u003cACCESS_TOKEN\u003e\"\n}\n```\n\n\nYou should send this authorization with any request to the protected endpoints\n\n```\nAuthorization: Bearer \u003cACCESS_TOKEN\u003e\n```\n\nCheck out these tutorials:\n\n- [Mocking a REST API Back-End for Your Angular App with JSON-Server and Faker.js](https://www.techiediaries.com/angular-mock-backend)\n- [Building a Fake and JWT Protected REST API with json-server](https://www.techiediaries.com/fake-api-jwt-json-server)\n- [Angular 9 Tutorial: Build an Example App with Angular CLI, Angular Router, HttpClient \u0026 Angular Material](https://www.shabang.dev/angular-tutorial-build-an-example-app-with-angular-cli-router-httpclient-and-angular-material/)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiediaries%2Ffake-api-jwt-json-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechiediaries%2Ffake-api-jwt-json-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiediaries%2Ffake-api-jwt-json-server/lists"}