{"id":17053782,"url":"https://github.com/terrymooreii/hapi-jwt-mongo","last_synced_at":"2026-05-07T09:31:44.583Z","repository":{"id":140328409,"uuid":"85249429","full_name":"TerryMooreII/hapi-jwt-mongo","owner":"TerryMooreII","description":"Hapi Authentication with JWT with Mongo.  Example/Starter project","archived":false,"fork":false,"pushed_at":"2017-03-16T23:11:09.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T22:25:02.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TerryMooreII.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-03-16T23:07:44.000Z","updated_at":"2017-03-16T23:11:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f23dcca-4001-483d-85a3-bd3639289a7c","html_url":"https://github.com/TerryMooreII/hapi-jwt-mongo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TerryMooreII/hapi-jwt-mongo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fhapi-jwt-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fhapi-jwt-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fhapi-jwt-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fhapi-jwt-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TerryMooreII","download_url":"https://codeload.github.com/TerryMooreII/hapi-jwt-mongo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fhapi-jwt-mongo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-14T10:13:13.812Z","updated_at":"2026-05-07T09:31:44.567Z","avatar_url":"https://github.com/TerryMooreII.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Hapi Authentication and Authorization with JWT and mongo\n==========\n\nExample to show how authentication and authorization works in Hapi.js on Node.js with Mongo/Mlab and JWT.\n\nThis project was cloned from a hapi with cookie auth [example.](https://medium.com/@poeticninja/authentication-and-authorization-with-hapi-5529b5ecc8ec#.12z6lpcao) So props...\n\nhapi JWT is from [here](https://github.com/dwyl/hapi-auth-jwt2)\n\n\nConfig.js\n-----------\nAdd a config.js to the root of your project (Better yet update to use ENV params)\n\n```javascrpt\nmodule.exports = {\n    token:{\n      secret: 'output of this -\u003e' //node -e \"console.log(require('crypto').randomBytes(256).toString('base64'));\"\n    },\n    db: {\n        username: '',\n        password: '',\n        hostname: '',\n        database: '',\n        port: ''\n    },\n    server: {\n        hostname: 'localhost',\n        port: 3000\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrymooreii%2Fhapi-jwt-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrymooreii%2Fhapi-jwt-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrymooreii%2Fhapi-jwt-mongo/lists"}