{"id":28076770,"url":"https://github.com/jaredhanson/passport-persona","last_synced_at":"2025-05-13T01:50:36.838Z","repository":{"id":8638612,"uuid":"10286738","full_name":"jaredhanson/passport-persona","owner":"jaredhanson","description":"Mozilla Persona authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2018-01-04T16:49:32.000Z","size":35,"stargazers_count":19,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T01:49:50.826Z","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}},"created_at":"2013-05-25T16:33:06.000Z","updated_at":"2019-09-17T20:41:46.000Z","dependencies_parsed_at":"2022-08-02T10:36:09.181Z","dependency_job_id":null,"html_url":"https://github.com/jaredhanson/passport-persona","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-persona","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-persona/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-persona/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-persona/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/passport-persona/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856616,"owners_count":21974576,"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:50:36.316Z","updated_at":"2025-05-13T01:50:36.829Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":["https://paypal.me/jaredhanson"],"categories":[],"sub_categories":[],"readme":"# passport-persona\n\n[![Build](https://img.shields.io/travis/jaredhanson/passport-persona.svg)](https://travis-ci.org/jaredhanson/passport-persona)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/passport-persona.svg)](https://coveralls.io/r/jaredhanson/passport-persona)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/passport-persona.svg?label=quality)](https://codeclimate.com/github/jaredhanson/passport-persona)\n[![Dependencies](https://img.shields.io/david/jaredhanson/passport-persona.svg)](https://david-dm.org/jaredhanson/passport-persona)\n\n\n[Passport](https://github.com/jaredhanson/passport) strategy for authenticating\nwith [Mozilla Persona](https://login.persona.org/).\n\nThis module lets you authenticate using Mozilla Persona in your Node.js\napplications.  By plugging into Passport, Persona authentication can be easily\nand unobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\nPersona is a fallback Identity Provider for the [BrowserID](https://developer.mozilla.org/en-US/docs/Mozilla/Persona)\nprotocol, a distributed login system from [Mozilla](http://www.mozilla.org/).\nThis strategy verifies assertions using Mozilla's [Remote Verification API](https://developer.mozilla.org/en-US/docs/Mozilla/Persona/Remote_Verification_API).\nApplications wishing to verify assertions locally should use\n[passport-browserid](https://github.com/jaredhanson/passport-browserid).\n\n## Install\n\n    $ npm install passport-persona\n\n## Usage\n\n#### Configure Strategy\n\nThe Persona authentication strategy authenticates users using an assertion of\nemail address ownership, obtained via the [navigator.id](https://developer.mozilla.org/en-US/docs/Web/API/navigator.id)\nJavaScript API.  The strategy requires a `verify` callback, which accepts an\nemail address and calls `cb` providing a user.\n\n    passport.use(new PersonaStrategy({\n        audience: 'http://www.example.com'\n      },\n      function(email, cb) {\n        User.findByEmail({ email: email }, function (err, user) {\n          return cb(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'persona'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.post('/auth/browserid', \n      passport.authenticate('persona', { 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 [signin example](https://github.com/jaredhanson/passport-persona/tree/master/examples/signin).\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## Support\n\n#### Funding\n\nThis software is provided to you as open source, free of charge.  The time and\neffort to develop and maintain this project is volunteered by [@jaredhanson](https://github.com/jaredhanson).\nIf you (or your employer) benefit from this project, please consider a financial\ncontribution.  Your contribution helps continue the efforts that produce this\nand other open source software.\n\nFunds are accepted via [PayPal](https://paypal.me/jaredhanson), [Venmo](https://venmo.com/jaredhanson),\nand [other](http://jaredhanson.net/pay) methods.  Any amount is appreciated.\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n  - [Leo McArdle](https://github.com/LeoMcA)\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\u003ca target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/passport-persona'\u003e  \u003cimg alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/passport-persona.svg' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-persona","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fpassport-persona","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-persona/lists"}