{"id":28076729,"url":"https://github.com/jaredhanson/passport-browserid","last_synced_at":"2025-05-13T01:48:43.735Z","repository":{"id":57319964,"uuid":"2829104","full_name":"jaredhanson/passport-browserid","owner":"jaredhanson","description":"BrowserID authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2017-09-17T01:26:07.000Z","size":64,"stargazers_count":53,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-13T01:48:24.414Z","etag":null,"topics":[],"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/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":"2011-11-22T16:34:04.000Z","updated_at":"2023-01-12T22:00:48.000Z","dependencies_parsed_at":"2022-08-26T01:11:13.959Z","dependency_job_id":null,"html_url":"https://github.com/jaredhanson/passport-browserid","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-browserid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-browserid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-browserid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fpassport-browserid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/passport-browserid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856615,"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:48:43.024Z","updated_at":"2025-05-13T01:48:43.722Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":["https://paypal.me/jaredhanson"],"categories":[],"sub_categories":[],"readme":"# passport-browserid\n\n[![Build](https://img.shields.io/travis/jaredhanson/passport-browserid.svg)](https://travis-ci.org/jaredhanson/passport-browserid)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/passport-browserid.svg)](https://coveralls.io/r/jaredhanson/passport-browserid)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/passport-browserid.svg?label=quality)](https://codeclimate.com/github/jaredhanson/passport-browserid)\n[![Dependencies](https://img.shields.io/david/jaredhanson/passport-browserid.svg)](https://david-dm.org/jaredhanson/passport-browserid)\n\n\n[Passport](https://github.com/jaredhanson/passport) strategy for authenticating\nwith [BrowserID](https://developer.mozilla.org/en-US/docs/Mozilla/Persona).\n\nThis module lets you authenticate using BrowserID in your Node.js applications.\nBy plugging into Passport, BrowserID 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[BrowserID](https://developer.mozilla.org/en-US/docs/Mozilla/Persona) is an\nopen, decentralized protocol for authenticating users based on email addresses,\ndeveloped by [Mozilla](http://www.mozilla.org/).  It is commonly associated with\n[Persona](https://login.persona.org/), the brand used for Mozilla's\nimplementation of BrowserID.  This strategy performs local verification of\nassertions, delivering on BrowserID's promise of ensuring user privacy.\n\n## Install\n\n    $ npm install passport-browserid\n\n## Usage\n\n#### Configure Strategy\n\nThe BrowserID authentication strategy authenticates users using an assertion of\nemail address ownership, obtained via the BrowserID JavaScript API.  The\nstrategy requires a `verify` callback, which accepts an email address and calls\n`cb` providing a user.\n\n    passport.use(new BrowserIDStrategy({\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 `'browserid'` 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('browserid', { failureRedirect: '/login' }),\n      function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\n      });\n\n## Considerations\n\n#### Specification\n\nThis module is implemented based on the specifications being developed by [Mozilla Identity](https://wiki.mozilla.org/Identity),\nwhich remain a work-in-progress and are *not* final.  Implementers are\nencouraged to track the progress of these specifications and update update their\nimplementations as necessary.  Furthermore, the implications of relying on\nnon-final specifications should be understood prior to deployment.\n\nWhile the specifications remain under development, it is recommended to use\nMozilla's [Remote Verification API](https://developer.mozilla.org/en-US/docs/Mozilla/Persona/Remote_Verification_API).\nThis functionality is implemented by [passport-persona](https://github.com/jaredhanson/passport-persona).\n\n## Examples\n\nFor a complete, working example, refer to the [signin example](https://github.com/jaredhanson/passport-browserid/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-2017 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-browserid'\u003e  \u003cimg alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/passport-browserid.svg' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-browserid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fpassport-browserid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fpassport-browserid/lists"}