{"id":26681621,"url":"https://github.com/royanger/passport-bungie","last_synced_at":"2026-05-16T11:01:22.649Z","repository":{"id":65372988,"uuid":"506523617","full_name":"royanger/passport-bungie","owner":"royanger","description":"Strategy for Passport to authenticate against the Bungie Oauth endpoints.","archived":false,"fork":false,"pushed_at":"2022-06-25T22:59:11.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T04:05:46.989Z","etag":null,"topics":["authentication","destiny2","destiny2api","nodejs","oauth2","passportjs"],"latest_commit_sha":null,"homepage":"","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/royanger.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}},"created_at":"2022-06-23T06:32:30.000Z","updated_at":"2023-03-09T01:06:38.000Z","dependencies_parsed_at":"2023-01-19T23:35:36.769Z","dependency_job_id":null,"html_url":"https://github.com/royanger/passport-bungie","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/royanger%2Fpassport-bungie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royanger%2Fpassport-bungie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royanger%2Fpassport-bungie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royanger%2Fpassport-bungie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royanger","download_url":"https://codeload.github.com/royanger/passport-bungie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605683,"owners_count":20643030,"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":["authentication","destiny2","destiny2api","nodejs","oauth2","passportjs"],"created_at":"2025-03-26T07:16:59.966Z","updated_at":"2025-10-29T11:02:47.540Z","avatar_url":"https://github.com/royanger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passport-Bungie\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Bungie](https://www.bungie.net/)\nusing the OAuth 2.0 API. This package was adopted from Fred Chien's\nexcellent [passport-github2](https://github.com/cfsghost/passport-github)\nStrategy.\n\nThis module lets you authenticate using Bungie in your Node.js applications.\nBy plugging into Passport, Bungie authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Installation\n\n```shell\n$ npm install passport-bungie\n```\n\n## Usage\n\n### Configure Strategy\n\nThe Bungie authentication strategy authenticates users using a [Bungie\napplication](https://www.bungie.net/en/Application) and OAuth 2.0 tokens.\nThe strategy requires a `verify` callback, which accepts these credentials\nand calls `done` providing a user, as well as `options` specifying a\nclient ID, client secret, an API Key, and callback URL.\n\n### IMPORTANT NOTE\n\nBungie requires the callback URL you set in the application to use https.\nYou can not use `http://localhost` even in development. You app, even in\ndevelopment, must use https. You can solve this however you like. The\nsolution I found with the least friction was [ngrok](https://ngrok.com/).\nYou can use a free account for development and easily setup a proxy.\n\n```javascript\npassport.use(\n   new GitHubStrategy(\n      {\n         clientID: BUNGIE_CLIENT_ID,\n         clientSecret: BUNGIE_CLIENT_SECRET,\n         callbackURL: 'https://127.0.0.1:3000/auth/bungie/callback',\n         customHeaders: { 'X-API-KEY': BUNGIE_APIKEY },\n      },\n      function (accessToken, refreshToken, profile, done) {\n         User.findOrCreate({ bungie: memberhipId }, function (err, user) {\n            return done(err, user);\n         });\n      }\n   )\n);\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'bungie'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```javascript\napp.get('/auth/bungie', passport.authenticate('bungie'));\n\napp.get(\n   '/auth/bungie/callback',\n   passport.authenticate('bungie', { failureRedirect: '/login' }),\n   function (req, res) {\n      // Successful authentication, redirect home.\n      res.redirect('/');\n   }\n);\n```\n\n## Examples\n\nFor a complete, working example, refer to the [login example](https://github.com/cfsghost/passport-github/tree/master/examples/login).\n\n## Tests\n\n```shell\n$ npm install --dev\n$ make test\n```\n\n[![Build Status](https://secure.travis-ci.org/cfsghost/passport-github.png)](http://travis-ci.org/cfsghost/passport-github)\n\n## Credits\n\n-  [Jared Hanson](http://github.com/jaredhanson)\n-  [Fred Chien](http://github.com/cfsghost)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011-2013 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyanger%2Fpassport-bungie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyanger%2Fpassport-bungie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyanger%2Fpassport-bungie/lists"}