{"id":28076675,"url":"https://github.com/jaredhanson/passport-paypal-oauth","last_synced_at":"2025-05-13T01:45:24.743Z","repository":{"id":3136668,"uuid":"4165305","full_name":"jaredhanson/passport-paypal-oauth","owner":"jaredhanson","description":"PayPal (OAuth) authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2024-06-07T15:36:50.000Z","size":11,"stargazers_count":30,"open_issues_count":11,"forks_count":28,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T01:45:16.897Z","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/jaredhanson.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":"2012-04-28T05:44:45.000Z","updated_at":"2024-12-03T10:08:47.000Z","dependencies_parsed_at":"2024-06-21T17:50:42.502Z","dependency_job_id":"6730b9f5-c209-4a77-a0b0-e1fd3a711790","html_url":"https://github.com/jaredhanson/passport-paypal-oauth","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"ce1256fd2cd5af8ea5995f9ec5a1e53a9512e3a1"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-paypal-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-paypal-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-paypal-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-paypal-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/passport-paypal-oauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856613,"owners_count":21974575,"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-05-13T01:45:24.046Z","updated_at":"2025-05-13T01:45:24.733Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":["http://www.paypal.com/"],"categories":[],"sub_categories":[],"readme":"# Passport-PayPal-OAuth\n\n[Passport](http://passportjs.org/) strategy for authenticating with [PayPal](http://www.paypal.com/)\nusing the OAuth 2.0 API.\n\nThis module lets you authenticate using PayPal in your Node.js applications.\nBy plugging into Passport, PayPal 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## Install\n\n    $ npm install passport-paypal-oauth\n\n## Usage\n\n#### Configure Strategy\n\nThe PayPal authentication strategy authenticates users using a PayPal\naccount and OAuth 2.0 tokens.  The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a app ID, app secret, and callback URL.\n\n    passport.use(new PayPalStrategy({\n        clientID: PAYPAL_APP_ID,\n        clientSecret: PAYPAL_APP_SECRET,\n        callbackURL: \"http://localhost:3000/auth/paypal/callback\"\n      },\n      function(accessToken, refreshToken, profile, done) {\n        User.findOrCreate({ paypalId: profile.id }, function (err, user) {\n          return done(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'paypal'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.get('/auth/paypal',\n      passport.authenticate('paypal'));\n\n    app.get('/auth/paypal/callback', \n      passport.authenticate('paypal', { failureRedirect: '/login' }),\n      function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\n      });\n\n## Examples\n\nFor a complete, working example, refer to the [login example](https://github.com/jaredhanson/passport-paypal-oauth/tree/master/examples/login).\n\n## Tests\n\n    $ npm install --dev\n    $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-paypal-oauth.png)](http://travis-ci.org/jaredhanson/passport-paypal-oauth)\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2013 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n\n\u003ca target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/passport-paypal-oauth'\u003e  \u003cimg alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/passport-paypal-oauth.svg' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-paypal-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fpassport-paypal-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-paypal-oauth/lists"}