{"id":28076696,"url":"https://github.com/jaredhanson/passport-oauth1","last_synced_at":"2025-07-08T20:32:50.590Z","repository":{"id":10045015,"uuid":"12091690","full_name":"jaredhanson/passport-oauth1","owner":"jaredhanson","description":"OAuth 1.0 authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2023-03-06T17:06:12.000Z","size":133,"stargazers_count":24,"open_issues_count":12,"forks_count":30,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-04T02:19:43.566Z","etag":null,"topics":["oauth","passport"],"latest_commit_sha":null,"homepage":"https://www.passportjs.org/packages/passport-oauth1/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=passport-oauth1\u0026utm_content=about","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"XcodeGhostSource/XcodeGhost","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredhanson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"jaredhanson","patreon":"jaredhanson","ko_fi":"jaredhanson"}},"created_at":"2013-08-13T20:10:40.000Z","updated_at":"2024-09-28T03:55:39.000Z","dependencies_parsed_at":"2024-06-18T13:42:59.115Z","dependency_job_id":"93f18edc-de04-4935-9938-809fe5fcd918","html_url":"https://github.com/jaredhanson/passport-oauth1","commit_stats":{"total_commits":93,"total_committers":7,"mean_commits":"13.285714285714286","dds":0.06451612903225812,"last_synced_commit":"2b770232e908a78b10704d093cf2f21ea4a23c64"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jaredhanson/passport-oauth1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-oauth1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-oauth1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-oauth1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-oauth1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/passport-oauth1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-oauth1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260616535,"owners_count":23036866,"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":["oauth","passport"],"created_at":"2025-05-13T01:46:46.539Z","updated_at":"2025-07-08T20:32:50.569Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jaredhanson","https://patreon.com/jaredhanson","https://ko-fi.com/jaredhanson"],"categories":[],"sub_categories":[],"readme":"# passport-oauth1\n\nGeneral-purpose OAuth 1.0 authentication strategy for [Passport](https://www.passportjs.org/).\n\nThis module lets you authenticate using OAuth in your Node.js applications.\nBy plugging into Passport, OAuth-based sign in can be easily and unobtrusively\nintegrated into any application or framework that supports\n[Connect](https://github.com/senchalabs/connect#readme)-style middleware,\nincluding [Express](https://expressjs.com/).\n\nNote that this strategy provides generic OAuth support.  In many cases, a\nprovider-specific strategy can be used instead, which cuts down on unnecessary\nconfiguration, and accommodates any provider-specific quirks.  See the\n[list](https://github.com/jaredhanson/passport/wiki/Strategies) for supported\nproviders.\n\nDevelopers who need to implement authentication against an OAuth provider that\nis not already supported are encouraged to sub-class this strategy.  If you\nchoose to open source the new provider-specific strategy, please add it to the\nlist so other people can find it.\n\n\u003cdiv align=\"center\"\u003e\n\n:heart: [Sponsors](https://www.passportjs.org/sponsors/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=passport-oauth1\u0026utm_content=nav-sponsors)\n\n\u003c/div\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003csup\u003eAdvertisement\u003c/sup\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://click.linksynergy.com/link?id=D*o7yui4/NM\u0026offerid=507388.380582\u0026type=2\u0026murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Flearn-oauth-2%2F\u0026u1=5I2riUEiNIRjPjdjxj6X4exznbT92nLNQKnhFoggiN\"\u003eLearn OAuth 2.0 - Get started as an API Security Expert\u003c/a\u003e\u003cbr\u003eJust imagine what could happen to YOUR professional career if you had skills in OAuth \u003e 8500 satisfied students\n\u003c/p\u003e\n\n---\n\n[![npm](https://img.shields.io/npm/v/passport-oauth1.svg)](https://www.npmjs.com/package/passport-oauth1)\n[![build](https://img.shields.io/travis/jaredhanson/passport-oauth1.svg)](https://travis-ci.org/jaredhanson/passport-oauth1)\n[![coverage](https://img.shields.io/coveralls/jaredhanson/passport-oauth1.svg)](https://coveralls.io/github/jaredhanson/passport-oauth1)\n[...](https://github.com/jaredhanson/passport-oauth1/wiki/Status)\n\n## Install\n\n    $ npm install passport-oauth1\n\n## Usage\n\n#### Configure Strategy\n\nThe OAuth authentication strategy authenticates users using a third-party\naccount and OAuth tokens.  The provider's OAuth endpoints, as well as the\nconsumer key and secret, are specified as options.  The strategy requires a\n`verify` callback, which receives a token and profile, and calls `cb`\nproviding a user.\n\n    passport.use(new OAuth1Strategy({\n        requestTokenURL: 'https://www.example.com/oauth/request_token',\n        accessTokenURL: 'https://www.example.com/oauth/access_token',\n        userAuthorizationURL: 'https://www.example.com/oauth/authorize',\n        consumerKey: EXAMPLE_CONSUMER_KEY,\n        consumerSecret: EXAMPLE_CONSUMER_SECRET,\n        callbackURL: \"http://127.0.0.1:3000/auth/example/callback\",\n        signatureMethod: \"RSA-SHA1\"\n      },\n      function(token, tokenSecret, profile, cb) {\n        User.findOrCreate({ exampleId: profile.id }, function (err, user) {\n          return cb(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'oauth'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.get('/auth/example',\n      passport.authenticate('oauth'));\n    \n    app.get('/auth/example/callback', \n      passport.authenticate('oauth', { failureRedirect: '/login' }),\n      function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\n      });\n\n## Related Modules\n\n- [passport-oauth2](https://github.com/jaredhanson/passport-oauth2) — OAuth 2.0 authentication strategy\n- [passport-http-oauth](https://github.com/jaredhanson/passport-http-oauth) — OAuth authentication strategy for APIs\n- [oauthorize](https://github.com/jaredhanson/oauthorize) — OAuth service provider toolkit\n\n## Contributing\n\n#### Tests\n\nThe test suite is located in the `test/` directory.  All new features are\nexpected to have corresponding test cases.  Ensure that the complete test suite\npasses by executing:\n\n```bash\n$ make test\n```\n\n#### Coverage\n\nAll new feature development is expected to have test coverage.  Patches that\nincrese test coverage are happily accepted.  Coverage reports can be viewed by\nexecuting:\n\n```bash\n$ make test-cov\n$ make view-cov\n```\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011-2016 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-oauth1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fpassport-oauth1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-oauth1/lists"}