{"id":28766911,"url":"https://github.com/zbdpay/passport-zebedee","last_synced_at":"2025-07-08T08:36:36.639Z","repository":{"id":46986576,"uuid":"503449024","full_name":"zbdpay/passport-zebedee","owner":"zbdpay","description":"Zebedee authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2022-06-14T17:44:42.000Z","size":12,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-16T18:27:58.650Z","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/zbdpay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-14T17:02:19.000Z","updated_at":"2024-11-26T05:59:31.000Z","dependencies_parsed_at":"2022-09-26T21:10:55.865Z","dependency_job_id":null,"html_url":"https://github.com/zbdpay/passport-zebedee","commit_stats":null,"previous_names":["zbdpay/passport-zebedee"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zbdpay/passport-zebedee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbdpay%2Fpassport-zebedee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbdpay%2Fpassport-zebedee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbdpay%2Fpassport-zebedee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbdpay%2Fpassport-zebedee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbdpay","download_url":"https://codeload.github.com/zbdpay/passport-zebedee/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbdpay%2Fpassport-zebedee/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260358805,"owners_count":22997125,"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":[],"created_at":"2025-06-17T12:33:44.956Z","updated_at":"2025-07-08T08:36:36.630Z","avatar_url":"https://github.com/zbdpay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# passport-zebedee\n\n[Passport](https://www.passportjs.org/) strategy for authenticating with Zebedee.\n\nThis module lets you authenticate using Zebedee in your Node.js applications.\nBy plugging into Passport, Zebedee authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](https://github.com/senchalabs/connect#readme)-style middleware,\nincluding [Express](https://expressjs.com/).\n\n## Install\n\n```sh\n$ npm install passport-zabedee\n```\n\n## Usage\n\n#### Register Application\n\nThe Zebedee strategy authenticates users using their Zebedee account.  Before your\napplication can make use of Zebedee's authentication system, you must first\n[register](https://dashboard.zebedee.io/) your app to use\nOAuth 2.0 with Zebedee APIs.  Once registered, a client ID and secret will be\nissued which are used by Zebedee to identify your app.\n\n#### Configure Strategy\n\nThe Zebedee authentication strategy authenticates users using a Zebedee account\nand OAuth 2.0 tokens.  The client ID and secret obtained when creating an\napplication are supplied as options when creating the strategy.  The strategy\nalso requires a `verify` callback, which receives the access token and optional\nrefresh token, as well as `profile` which contains the authenticated user's\nZebedee's profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```javascript\nvar ZebedeeStrategy = require('passport-zebedee').Strategy;\n\npassport.use(new ZebedeeStrategy({\n    clientID: ZEBEDEE_CLIENT_ID,\n    clientSecret: ZEBEDEE_CLIENT_SECRET,\n    callbackURL: \"http://www.example.com/auth/zebedee/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({ zebedeeId: profile.id }, function (err, user) {\n      return cb(err, user);\n    });\n  }\n));\n```\n\n#### Define Routes\n\nTwo routes are needed in order to allow users to log in with their Zebedee\naccount.  The first route redirects the user to Zebedee, where they will\nauthenticate:\n\n```js\napp.get('/login/zebedee',\n  passport.authenticate('zebedee', { scope: ['user'] }));\n```\n\nThe second route processes the authentication response and logs the user in,\nafter Zebedee redirects the user back to the app:\n\n```js\napp.get('/oauth2/redirect/zebedee',\n  passport.authenticate('zebedee', { failureRedirect: '/login', failureMessage: true }),\n  function(req, res) {\n    res.redirect('/');\n  });\n```\n\n## Examples\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2022 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n\nCopyright (c) 2021-2022 Zebedee, Inc \u003c[http://zebedee.io/](http://zebedee.io/)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbdpay%2Fpassport-zebedee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbdpay%2Fpassport-zebedee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbdpay%2Fpassport-zebedee/lists"}