{"id":20603392,"url":"https://github.com/rvpanoz/jwtauth","last_synced_at":"2026-05-04T01:33:56.535Z","repository":{"id":89194269,"uuid":"152305283","full_name":"rvpanoz/jwtauth","owner":"rvpanoz","description":"JSON Web Token implementation with HapiJS in collaboration with MongoDB via mongoose.","archived":false,"fork":false,"pushed_at":"2018-10-10T21:50:18.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T10:05:22.369Z","etag":null,"topics":["authentication","hapijs","jwt-authentication","mongodb","mongoose","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/rvpanoz.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":"2018-10-09T18:58:30.000Z","updated_at":"2018-10-10T21:49:14.000Z","dependencies_parsed_at":"2023-06-14T09:15:20.566Z","dependency_job_id":null,"html_url":"https://github.com/rvpanoz/jwtauth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rvpanoz/jwtauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvpanoz%2Fjwtauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvpanoz%2Fjwtauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvpanoz%2Fjwtauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvpanoz%2Fjwtauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvpanoz","download_url":"https://codeload.github.com/rvpanoz/jwtauth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvpanoz%2Fjwtauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","hapijs","jwt-authentication","mongodb","mongoose","nodejs"],"created_at":"2024-11-16T09:17:10.000Z","updated_at":"2026-05-04T01:33:56.530Z","avatar_url":"https://github.com/rvpanoz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwtauth\n\nJSON Web Token implementation with HapiJS in collaboration with MongoDB via mongoose.\n\n## Usage\n\nClone the repository and then issue the command to install application dependencies\n\n`npm install`\n\nIn the repository root folder run the command to start the server\n\n`npm start`\n\n## Create a new user\n\nRegister a new user to the system\n\n**URL** : `/api/user/create`\n\n**Method** : `POST`\n\n**Auth required** : NO\n\n**Payload example**\n\n```json\n{\n  \"email\": \"foo@bar.com\",\n  \"password\": \"061182\"\n}\n```\n\n## Success Responses\n\n**Condition** : Data provided is valid and User is created.\n\n**Code** : `200 OK`\n\n**Content example** : Response with the new user data\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"user\": {\n      \"created_at\": \"2018-10-10T21:34:41.417Z\",\n      \"_id\": \"5bbe7077a613335cef0fd7ec\",\n      \"email\": \"foo@bar.com\",\n      \"password\": \"$2b$10$UmonZBB3bx8sxJU3SQpS.e60Gq.FMsyunTlJ6q58VsXEqXNGcEawi\",\n      \"__v\": 0\n    },\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjViYmU3MDc3YTYxMzMzNWNlZjBmZDdlYyIsImVtYWlsIjoicnZwYW5vemhoNTUyOUBnbWFpbC5jb20iLCJpYXQiOjE1MzkyMDcyODcsImV4cCI6MTUzOTIxMDg4N30.Y-E__abwHOhJX5UQDpW4uETyRrRRJCbU7QeRha_mjTs\"\n  }\n}\n```\n\n## Error Response - Email taken\n\n**Condition** : If provided email is taken\n\n**Code** : `400 BAD REQUEST`\n\n**Content example** :\n\n```json\n{\n  \"statusCode\": 400,\n  \"error\": \"Bad Request\",\n  \"message\": \"Email taken\"\n}\n```\n\n## Authenticate user\n\nAuthenticate a user using email and password\n\n**URL** : `/api/user/authenticate`\n\n**Method** : `POST`\n\n**Auth required** : NO\n\n**Payload example**\n\n```json\n{\n  \"email\": \"foo@bar.com\",\n  \"password\": \"061182\"\n}\n```\n## Success Responses\n\n**Condition** : Data provided is valid and User is authenticated.\n\n**Code** : `200 OK`\n\n**Content example** : Response with the user's email and token\n\n```json\n{\n    \"success\": true,\n    \"data\": {\n        \"user\": \"foo@bar.com\",\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJ2cGFub3poaDU1MzI5QGdtYWlsLmNvbSIsImlhdCI6MTUzOTIwNzk3NiwiZXhwIjoxNTM5MjExNTc2fQ.keGuJZKWMwP4SNhvE_qyNHAIWx979vOFjB7obtrTHdk\"\n    }\n}\n```\n\n## Add custom routes\n\nAdd your own routes to the routes folder. In order to register the routes with the server import your routes in `./server.js` and then issue the command\n\n```javascript\nimport { your_routes } from \"./routes\";\n\nserver.route(your_routes);\n```\n\n## Notes\n\n- You can change the default configuration file `./config.js` to setup your mongodb installation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvpanoz%2Fjwtauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvpanoz%2Fjwtauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvpanoz%2Fjwtauth/lists"}