{"id":22390198,"url":"https://github.com/oauth-everything/passport-patreon","last_synced_at":"2025-10-15T13:31:50.090Z","repository":{"id":35103735,"uuid":"207010872","full_name":"oauth-everything/passport-patreon","owner":"oauth-everything","description":"A Passport strategy for authenticating with https://www.patreon.com/","archived":false,"fork":false,"pushed_at":"2022-02-12T13:30:57.000Z","size":49,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-05T03:14:32.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oauth-everything.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-07T18:39:01.000Z","updated_at":"2024-10-13T03:11:02.000Z","dependencies_parsed_at":"2022-08-08T05:01:15.850Z","dependency_job_id":null,"html_url":"https://github.com/oauth-everything/passport-patreon","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/oauth-everything%2Fpassport-patreon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-patreon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-patreon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-patreon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oauth-everything","download_url":"https://codeload.github.com/oauth-everything/passport-patreon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236613836,"owners_count":19177350,"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":"2024-12-05T03:14:35.092Z","updated_at":"2025-10-15T13:31:44.805Z","avatar_url":"https://github.com/oauth-everything.png","language":"TypeScript","funding_links":["https://patreon.com/"],"categories":[],"sub_categories":[],"readme":"@oauth-everything/passport-patreon\n==================================\n\nA [Passport](http://passportjs.org/) strategy for authenticating with\n[Patreon](https://patreon.com/) using OAuth 2.0 and the Patreon API v2.\n\nThis module lets you authenticate using Patreon in your Node.js applications.\nBy plugging into Passport, Patreon authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](https://www.senchalabs.org/connect/)-style middleware, including\n[Express](https://expressjs.com/).\n\n## Install\n\n```bash\n$ npm install @oauth-everything/passport-patreon\n```\n#### Configure Strategy\n\nThe Patreon authentication strategy authenticates users using a Patreon\naccount and OAuth 2.0 tokens.  The app 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\nPatreon profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```ts\npassport.use(new Strategy(\n    {\n        clientID: PATREON_APP_ID,\n        clientSecret: PATREON_APP_SECRET,\n        callbackURL: \"http://localhost:3000/auth/patreon/callback\"\n    },\n    (accessToken: string, refreshToken: string, profile: Profile, cb: VerifyCallback\u003cUser\u003e) =\u003e {\n\n        User.findOrCreate({ patreonId: profile.id }, (err: Error, user: User) =\u003e {\n            return cb(err, user);\n        });\n    }\n));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'patreon'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](https://expressjs.com/)\napplication:\n\n```javascript\napp.get('/auth/patreon',\n  passport.authenticate('patreon'));\n\napp.get('/auth/patreon/callback',\n  passport.authenticate('patreon', { failureRedirect: '/login' }),\n  function(req, res) {\n    // Successful authentication, redirect home.\n    res.redirect('/');\n  });\n```\n\n## License\n\n[The MPL v2 License](https://opensource.org/licenses/MPL-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauth-everything%2Fpassport-patreon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foauth-everything%2Fpassport-patreon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauth-everything%2Fpassport-patreon/lists"}