{"id":13602103,"url":"https://github.com/bnoguchi/everyauth","last_synced_at":"2025-04-10T23:27:24.433Z","repository":{"id":1426710,"uuid":"1574656","full_name":"bnoguchi/everyauth","owner":"bnoguchi","description":"node.js auth package (password, facebook, \u0026 more) for Connect and Express apps","archived":false,"fork":false,"pushed_at":"2022-02-16T18:54:30.000Z","size":7950,"stargazers_count":3492,"open_issues_count":174,"forks_count":447,"subscribers_count":103,"default_branch":"master","last_synced_at":"2024-10-29T15:27:22.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://everyauth.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bnoguchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-05T23:26:28.000Z","updated_at":"2024-10-21T09:17:38.000Z","dependencies_parsed_at":"2022-07-07T12:44:35.811Z","dependency_job_id":null,"html_url":"https://github.com/bnoguchi/everyauth","commit_stats":null,"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnoguchi%2Feveryauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnoguchi%2Feveryauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnoguchi%2Feveryauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnoguchi%2Feveryauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnoguchi","download_url":"https://codeload.github.com/bnoguchi/everyauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248314092,"owners_count":21082981,"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-08-01T18:01:14.156Z","updated_at":"2025-04-10T23:27:24.404Z","avatar_url":"https://github.com/bnoguchi.png","language":"JavaScript","readme":"everyauth\n==========\n\nAuthentication and authorization (password, facebook, \u0026 more) for your node.js Connect and Express apps.\n\nThere is a NodeTuts screencast of everyauth [here](http://vimeo.com/26532298)\n\nThere is also a Google Groups (recently created)\n[here](http://groups.google.com/group/everyauth) to post questions and discuss\npotential ideas and extensions to the library.\n\nSo far, `everyauth` enables you to login via:\n\n\u003ctable style=\"text-align:left\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n         \u003cth\u003e Authenticate Via                                                                                                             \u003cth\u003e Credits\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e \u003ctd\u003e Password                                                                                                                     \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/facebook.ico\" style=\"vertical-align:middle\"\u003e Facebook       \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/twitter.ico\" style=\"vertical-align:middle\"\u003e Twitter         \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/google.ico\" style=\"vertical-align:middle\"\u003e Google           \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/google.ico\" style=\"vertical-align:middle\"\u003e Google Hybrid    \u003ctd\u003e \u003ca href=\"https://github.com/rocketlabsdev\"\u003eRocketLabs Development\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/linkedin.ico\" style=\"vertical-align:middle\"\u003e LinkedIn       \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/dropbox.ico\" style=\"vertical-align:middle\"\u003e Dropbox         \u003ctd\u003e \u003ca href=\"https://github.com/torgeir\"\u003eTorgeir\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/tumblr.jpg\" style=\"vertical-align:middle\"\u003e Tumblr           \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/evernote.ico\" style=\"vertical-align:middle\"\u003e Evernote         \u003ctd\u003e \u003ca href=\"https://github.com/dannyamey\"\u003eDanny Amey\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/github.ico\" style=\"vertical-align:middle\"\u003e Github           \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/instagram.ico\" style=\"vertical-align:middle\"\u003e Instagram     \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/foursquare.ico\" style=\"vertical-align:middle\"\u003e Foursquare   \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/yahoo.ico\" style=\"vertical-align:middle\"\u003e Yahoo!            \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/justintv.ico\" style=\"vertical-align:middle\"\u003e Justin.tv      \u003ctd\u003e \u003ca href=\"https://github.com/slickplaid\"\u003eslickplaid\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/vimeo.gif\" style=\"vertical-align:middle\"\u003e Vimeo             \u003ctd\u003e \u003ca href=\"https://github.com/slickplaid\"\u003eslickplaid\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/37signals.ico\" style=\"vertical-align:middle\"\u003e 37signals \n                                                                                              (Basecamp, Highrise, Backpack, Campfire)     \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/readability.ico\" style=\"vertical-align:middle\"\u003e Readability \u003ctd\u003e \u003ca href=\"https://github.com/alfrednerstu\"\u003eAlfred Nerstu\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/angellist.ico\" style=\"vertical-align:middle\" width=\"16px\" height=\"16px\"\u003e AngelList     \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/dwolla.ico\" style=\"vertical-align:middle\"\u003e Dwolla           \u003ctd\u003e \u003ca href=\"https://github.com/nanek\"\u003eKenan Shifflett\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/osm.ico\" style=\"vertical-align:middle\"\u003e OpenStreetMap       \u003ctd\u003e \u003ca href=\"https://github.com/christophlsa\"\u003eChristoph Giesel\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/meritt/everyauth/raw/vkontakte/media/vkontakte.ico\" style=\"vertical-align:middle\"\u003e VKontakte (Russian Social Network) \u003ctd\u003e \u003ca href=\"https://github.com/meritt\"\u003eAlexey Simonenko\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/biggora/everyauth/raw/master/media/mailru.ico\" style=\"vertical-align:middle\"\u003e Mail.ru (Russian Social Network) \u003ctd\u003e \u003ca href=\"https://github.com/biggora\"\u003eAlexey Gordeyev\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/skyrock.ico\" style=\"vertical-align:middle\" width=\"16px\" height=\"16px\"\u003e Skyrock         \u003ctd\u003e \u003ca href=\"https://github.com/srod\"\u003eRodolphe Stoclin\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/gowalla.ico\" style=\"vertical-align:middle\"\u003e Gowalla         \u003ctd\u003e \u003ca href=\"https://github.com/andykram\"\u003eAndrew Kramolisch\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/tripit.png\" style=\"vertical-align:middle\"\u003e TripIt           \u003ctd\u003e \u003ca href=\"https://github.com/pirxpilot\"\u003eDamian Krzeminski\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/500px.ico\" style=\"vertical-align:middle\"\u003e 500px             \u003ctd\u003e \u003ca href=\"https://github.com/dannyamey\"\u003eDanny Amey\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/soundcloud.ico\" style=\"vertical-align:middle\"\u003e SoundCloud   \u003ctd\u003e \u003ca href=\"https://github.com/chrisleishman\"\u003eChris Leishman\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/mixi.ico\" style=\"vertical-align:middle\"\u003e mixi\n       \u003ctd\u003e \u003ca href=\"https://github.com/ufssf\"\u003eufssf\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"http://static.mailchimp.com/www/downloads/brand-assets/Freddie_Light_Background.png\" style=\"vertical-align:middle\" width=\"16px\"\u003e Mailchimp\n      \u003ctd\u003e \u003ca href=\"http://github.com/wnadeau\"\u003eWinfred Nadeau\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/mendeley.ico\" style=\"vertical-align:middle\"\u003e Mendeley\n       \u003ctd\u003e \u003ca href=\"https://github.com/edy-b\"\u003eEduard Baun\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/Datahero/everyauth/raw/express3/media/stripe.ico\" style=\"vertical-align:middle;\" width=\"16px\" height=\"16px\"\u003e Stripe\n       \u003ctd\u003e \u003ca href=\"https://github.com/jzabel\"\u003eJeff Zabel\u003c/a\u003e from \u003ca href=\"http://www.datahero.com\"\u003e Datahero \u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/Datahero/everyauth/raw/express3/media/salesforce.ico\" style=\"vertical-align:middle\"\u003e Salesforce\n       \u003ctd\u003e \u003ca href=\"https://github.com/jzabel\"\u003eJeff Zabel\u003c/a\u003e from \u003ca href=\"http://www.datahero.com\"\u003e Datahero \u003c/a\u003e\n  \u003c/tbody\u003e\n  \u003ctbody id=misc\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/box.ico\" style=\"vertical-align:middle\"\u003e Box.net             \u003ctd\u003e\n    \u003ctr\u003e \u003ctd\u003e \u003cimg src=\"https://github.com/bnoguchi/everyauth/raw/master/media/openid.ico\" style=\"vertical-align:middle\" width=\"16px\" height=\"16px\"\u003e OpenId           \u003ctd\u003e \u003ca href=\"https://github.com/rocketlabsdev\"\u003eRocketLabs Development\u003c/a\u003e, \u003ca href=\"https://github.com/starfishmod\"\u003eAndrew Mee, \u003ca href=\"https://github.com/bnoguchi\"\u003eBrian Noguchi\u003c/a\u003e \n    \u003ctr\u003e \u003ctd\u003e LDAP / ActiveDirectory                                                                                                       \u003ctd\u003e \u003ca href=\"https://github.com/marek-obuchowicz\"\u003eMarek Obuchowicz\u003c/a\u003e from \u003ca href=\"https://www.korekontrol.eu/\"\u003eKorekontrol\u003c/a\u003e\n    \u003ctr\u003e \u003ctd\u003e Windows Azure Access Control Service (ACS)\u003ctd\u003e \u003ca href=\"https://github.com/darrenzully\"\u003eDario Renzulli\u003c/a\u003e, \u003ca href=\"https://github.com/jpgarcia\"\u003eJuan Pablo Garcia\u003c/a\u003e, \u003ca href=\"https://github.com/woloski\"\u003eMatias Woloski\u003c/a\u003e from \u003ca href=\"http://blogs.southworks.net/\"\u003eSouthworks\u003c/a\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n`everyauth` is:\n\n- **Modular** - We have you covered with Facebook and Twitter \n  OAuth logins, basic login/password support, and modules \n  coming soon for beta invitation support and more.\n- **Easily Configurable** - everyauth was built with powerful\n  configuration needs in mind. Configure an authorization strategy \n  in a straightforward, easy-to-read \u0026 easy-to-write approach, \n  with as much granularity as you want over the steps and \n  logic of your authorization strategy.\n- **Idiomatic** - The syntax for configuring and extending your authorization strategies are\n  idiomatic and chainable.\n\n\n## Installation\n    $ npm install everyauth\n\n## Quick Start\n\nIncorporate everyauth into your express app in just 2 easy steps.\n\n1. **Choose and Configure Auth Strategies** - Find the authentication strategy\n   you desire in one of the sections below. Follow the configuration\n   instructions.\n2. **Add the Middleware to Express**\n\n    ```javascript\n    var everyauth = require('everyauth');\n    // Step 1 code goes here\n\n    // Step 2 code\n    var express = require('express');\n    var app = express();\n    app\n      .use(express.bodyParser())\n      .use(express.cookieParser('mr ripley'))\n      .use(express.session())\n      .use(everyauth.middleware(app));\n    ```\n\n## Example Application\n\nThere is an example application at [./example](https://github.com/bnoguchi/everyauth/tree/master/example)\n\nTo run it:\n\n    $ cd example\n    $ node server.js\n\n**Important** - Some OAuth Providers do not allow callbacks to localhost, so you will need to create a `localhost`\nalias called `local.host`. Make sure you set up your /etc/hosts so that 127.0.0.1 is also \nassociated with 'local.host'. So inside your /etc/hosts file, one of the lines will look like:\n\n    127.0.0.1\tlocalhost local.host\n\nThen point your browser to [http://local.host:3000](http://local.host:3000)\n\n## Tests\n\n    $ npm install everyauth --dev\n\nThen, update test/creds.js with credentials that the integration tests use to\nlogin to each 3rd party service.\n\n    $ make test\n\n## Accessing the User\n\nIf you are using `express` or `connect`, then `everyauth` \nprovides an easy way to access the user as:\n\n- `req.user` from your app server\n- `everyauth.user` via the `everyauth` helper accessible from your `express` views.\n- `user` as a helper accessible from your `express` views\n\nTo access the user, configure `everyauth.everymodule.findUserById` and\noptionally `everyauth.everymodule.userPkey`.\nFor example, using [mongoose](http://github.com/LearnBoost/mongoose):\n\n```javascript\neveryauth.everymodule.findUserById( function (userId, callback) {\n  User.findById(userId, callback);\n  // callback has the signature, function (err, user) {...}\n});\n```\n\nIf you need access to the request object the function can have three arguments:\n\n```javascript\neveryauth.everymodule.findUserById( function (req, userId, callback) {\n\n  // use the request in some way ...\n\n  // callback has the signature, function (err, user) {...}\n});\n```\n\nOnce you have configured this method, you now have access to the user object\nthat was fetched anywhere in your server app code as `req.user`. For instance:\n\n```javascript\nvar app = require('express').createServer()\n\n// Configure your app\n\napp.get('/', function (req, res) {\n  console.log(req.user);  // FTW!\n  res.render('home');\n});\n```\n\nMoreover, you can access the user in your views as `everyauth.user` or as `user`.\n\n    //- Inside ./views/home.jade\n    span.user-id= everyauth.user.name\n    #user-id= user.id\n\n`everyauth` assumes that you store your users with an `id` property. If not --\ne.g, if you adopt the convention `user.uid` over `user.id` -- then just make\nsure to configure the `everyauth.everymodule.userPkey` parameter:\n\n```javascript\neveryauth.everymodule.userPkey('uid');\n```\n\n## Express Helpers\n\nIf you are using express, everyauth comes with some useful dynamic helpers.\nTo enable them:\n\n```javascript\nvar express = require('express')\n  , everyauth = require('everyauth')\n  , app = express.createServer();\n\neveryauth.helpExpress(app);\n```\n\nThen, from within your views, you will have access to the following helpers methods\nattached to the helper, `everyauth`:\n\n- `everyauth.loggedIn`\n- `everyauth.user` - the User document associated with the session\n- `everyauth.facebook` - The is equivalent to what is stored at `req.session.auth.facebook`, \n  so you can do things like ...\n- `everyauth.facebook.user` - returns the user json provided from the OAuth provider.\n- `everyauth.facebook.accessToken` - returns the access_token provided from the OAuth provider\n  for authorized API calls on behalf of the user.\n- And you also get this pattern for other modules - e.g., `everyauth.twitter.user`, \n  `everyauth.github.user`, etc.\n\nYou also get access to the view helper\n\n- `user` - the same as `everyauth.user` above\n\nAs an example of how you would use these, consider the following `./views/user.jade` jade template:\n\n    .user-id\n      .label User Id\n      .value #{user.id}\n    .facebook-id\n      .label User Facebook Id\n      .value #{everyauth.facebook.user.id}\n\nIf you already have an express helper named `user`, then you can configure\n`everyauth` to use a different helper name to access the user object that\neveryauth manages. To do so, leverage the `userAlias` option for\n`everyauth.helpExpress`:\n\n```javascript\neveryauth.helpExpress(app, { userAlias: '__user__' });\n```\n\nThen, you could access the user object in your view with the helper `__user__`\ninstead of the default helper `user`. So you can compare with the default use\nof helpers given previously, the alternative leveraging userAlias would look like:\n\n    .user-id\n      .label User Id\n      .value #{__user__.id}\n    .facebook-id\n      .label User Facebook Id\n      .value #{everyauth.facebook.user.id}\n\n`everyauth` also provides convenience methods on the `ServerRequest` instance `req`. \nFrom any scope that has access to `req`, you get the following convenience getters and methods:\n\n- `req.loggedIn` - a Boolean getter that tells you if the request is by a logged in user\n- `req.user`     - the User document associated with the session\n- `req.logout()` - clears the session of your auth data\n\n## Logging Out\n\nIf you integrate `everyauth` with `connect`, then `everyauth` automatically\nsets up a `logoutPath` at `GET` `/logout` for your app. It also\nsets a default handler for your logout route that clears your session\nof auth information and redirects them to '/'.\n\nTo over-write the logout path:\n\n```javascript\neveryauth.everymodule.logoutPath('/bye');\n```\n\nTo over-write the logout redirect path:\n\n```javascript\neveryauth.everymodule.logoutRedirectPath('/navigate/to/after/logout');\n```\n\nTo over-write the logout handler:\n\n```javascript\neveryauth.everymodule.handleLogout( function (req, res) {\n  // Put you extra logic here\n  \n  req.logout(); // The logout method is added for you by everyauth, too\n  \n  // And/or put your extra logic here\n  \n  this.redirect(res, this.logoutRedirectPath());\n});\n```\n\n## Custom redirect on password-based login or registration\n\nYou may want your own callback that decides where to send a user after login or registration.  One way of doing this is with the `respondToLoginSucceed` and `respondToRegistrationSucceed` methods.  This assumes that you have set a `.redirectTo` property on your `req.session` object:\n\n```javascript\neveryauth.password\n  .respondToLoginSucceed( function (res, user, data) {\n    if (user) {\n      this.redirect(res, data.session.redirectTo)\n    }   \n  })\n  .respondToRegistrationSucceed( function (res, user, data) {\n    this.redirect(res, data.session.redirectTo)\n  })\n```\n\nIf you are using express and want your redirects to be subject to [express\nredirect mapping](http://expressjs.com/guide.html#res.redirect\\(\\)), you can\noverwrite redirect method employed by everyauth.\n\n```javascript\neveryauth.everymodule\n  .performRedirect( function (res, location) {\n    res.redirect(location, 303);\n  });\n```\n\nA newly defined method will be used by everyauth to perform all redirects.\n\n# Auth Strategy Instructions\n\n## Facebook Connect\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.facebook\n  .appId('YOUR APP ID HERE')\n  .appSecret('YOUR APP SECRET HERE')\n  .handleAuthCallbackError( function (req, res) {\n    // If a user denies your app, Facebook will redirect the user to\n    // /auth/facebook/callback?error_reason=user_denied\u0026error=access_denied\u0026error_description=The+user+denied+your+request.\n    // This configurable route handler defines how you want to respond to\n    // that.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokExtra, fbUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.facebook\n  .entryPath('/auth/facebook')\n  .callbackPath('/auth/facebook/callback')\n  .scope('email')                        // Defaults to undefined\n  .fields('id,name,email,picture')       // Controls the returned fields. Defaults to undefined\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.facebook.scope(); // undefined\neveryauth.facebook.fields(); // undefined\neveryauth.facebook.entryPath(); // '/auth/facebook'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.facebook.configurable();\n```\n\n### Dynamic Facebook Connect Scope\n\nFacebook provides many different \n[permissions](http://developers.facebook.com/docs/authentication/permissions/)\nfor which your app can ask your user. This is bundled up in the `scope` query\nparemter sent with the oauth request to Facebook. While your app may require \nseveral different permissions from Facebook, Facebook recommends that you only\nask for these permissions incrementally, as you need them. For example, you might\nwant to only ask for the \"email\" scope upon registration. At the same time, for\nanother user, you may want to ask for \"user_status\" permissions because they\nhave progressed further along in your application.\n\n`everyauth` enables you to specify the \"scope\" dynamically with a second\nvariation of the configurable `scope`. In addition to the first variation\nthat looks like:\n\n```javascript\neveryauth.facebook\n  .scope('email,user_status');\n```\n\nyou can have greater dynamic control over \"scope\" via the second variation of `scope`:\n\n```javascript\neveryauth.facebook\n  .scope( function (req, res) {\n    var session = req.session;\n    switch (session.userPhase) {\n      case 'registration':\n        return 'email';\n      case 'share-media':\n        return 'email,user_status';\n    }\n  });\n\n```\n\n### Facebook Mobile OAuth Dialog\nIf you are programming for mobile, you can bring up the facebook mobile OAuth\ndialog instead of the traditional desktop browser-based one by just adding\n`mobile(true)` to your configuration as seen here:\n\n```javascript\neveryauth.facebook\n  .mobile(true)\n  .appId('YOUR APP ID HERE')\n  .appSecret('YOUR APP SECRET HERE')\n  // rest of configuration\n```\n\n## Twitter OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.twitter\n  .consumerKey('YOUR CONSUMER ID HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenSecret, twitterUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n**Important** - Some developers forget to do the following, and it causes them to have issues with `everyauth`.\nPlease make sure to do the following: When you set up your app at http://dev.twitter.com/, make sure that your callback url is set up to\ninclude that path '/auth/twitter/callback/'. In general, when dealing with OAuth or OAuth2 modules\nprovided by `everyauth`, the default callback path is always set up to follow the pattern\n'/auth/#{moduleName}/callback', so just ensure that you configure your OAuth settings accordingly with\nthe OAuth provider -- in this case, the \"Edit Application Settings\" section for your app at http://dev.twitter.com.\n\nAlternatively, you can specify the callback url at the application level by configuring `callbackPath` (which\nhas a default configuration of \"/auth/twitter/callback\"):\n\n```javascript\neveryauth.twitter\n  .consumerKey('YOUR CONSUMER ID HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .callbackPath('/custom/twitter/callback/path')\n  .findOrCreateUser( function (session, accessToken, accessTokenSecret, twitterUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n```\n\nSo if your hostname is `example.com`, then this configuration will over-ride the `dev.twitter.com` callback url configuration.\nInstead, Twitter will redirect back to `example.com/custom/twitter/callback/path` in the example just given above.\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.twitter\n  .entryPath('/auth/twitter')\n  .callbackPath('/auth/twitter/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.twitter.callbackPath(); // '/auth/twitter/callback'\neveryauth.twitter.entryPath(); // '/auth/twitter'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.twitter.configurable();\n```\n\n## Password Authentication\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.password\n  .getLoginPath('/login') // Uri path to the login page\n  .postLoginPath('/login') // Uri path that your login form POSTs to\n  .loginView('a string of html; OR the name of the jade/etc-view-engine view')\n  .authenticate( function (login, password) {\n    // Either, we return a user or an array of errors if doing sync auth.\n    // Or, we return a Promise that can fulfill to promise.fulfill(user) or promise.fulfill(errors)\n    // `errors` is an array of error message strings\n    //\n    // e.g., \n    // Example 1 - Sync Example\n    // if (usersByLogin[login] \u0026\u0026 usersByLogin[login].password === password) {\n    //   return usersByLogin[login];\n    // } else {\n    //   return ['Login failed'];\n    // }\n    //\n    // Example 2 - Async Example\n    // var promise = this.Promise()\n    // YourUserModel.find({ login: login}, function (err, user) {\n    //   if (err) return promise.fulfill([err]);\n    //   promise.fulfill(user);\n    // }\n    // return promise;\n  })\n  .loginSuccessRedirect('/') // Where to redirect to after a login\n  \n    // If login fails, we render the errors via the login view template,\n    // so just make sure your loginView() template incorporates an `errors` local.\n    // See './example/views/login.jade'\n\n  .getRegisterPath('/register') // Uri path to the registration page\n  .postRegisterPath('/register') // The Uri path that your registration form POSTs to\n  .registerView('a string of html; OR the name of the jade/etc-view-engine view')\n  .validateRegistration( function (newUserAttributes) {\n    // Validate the registration input\n    // Return undefined, null, or [] if validation succeeds\n    // Return an array of error messages (or Promise promising this array)\n    // if validation fails\n    //\n    // e.g., assuming you define validate with the following signature\n    // var errors = validate(login, password, extraParams);\n    // return errors;\n    //\n    // The `errors` you return show up as an `errors` local in your jade template\n  })\n  .registerUser( function (newUserAttributes) {\n    // This step is only executed if we pass the validateRegistration step without\n    // any errors.\n    //\n    // Returns a user (or a Promise that promises a user) after adding it to\n    // some user store.\n    //\n    // As an edge case, sometimes your database may make you aware of violation\n    // of the unique login index, so if this error is sent back in an async\n    // callback, then you can just return that error as a single element array\n    // containing just that error message, and everyauth will automatically handle\n    // that as a failed registration. Again, you will have access to this error via\n    // the `errors` local in your register view jade template.\n    // e.g.,\n    // var promise = this.Promise();\n    // User.create(newUserAttributes, function (err, user) {\n    //   if (err) return promise.fulfill([err]);\n    //   promise.fulfill(user);\n    // });\n    // return promise;\n    //\n    // Note: Index and db-driven validations are the only validations that occur \n    // here; all other validations occur in the `validateRegistration` step documented above.\n  })\n  .registerSuccessRedirect('/'); // Where to redirect to after a successful registration\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.password\n  .loginFormFieldName('login')       // Defaults to 'login'\n  .passwordFormFieldName('password') // Defaults to 'password'\n  .loginLayout('custom_login_layout') // Only with `express`\n  .registerLayout('custom reg_layout') // Only with `express`\n  .loginLocals(fn);                    // See Recipe 3 below\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.password.loginFormFieldName();    // 'login'\neveryauth.password.passwordFormFieldName(); // 'password'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.password.configurable();\n```\n\n### Password Recipe 1: Extra registration data\n\nSometimes your registration will ask for more information from the user besides the login and password.\n\nFor this particular scenario, you can configure the optional step, `extractExtraRegistrationParams`.\n\n```javascript\neveryauth.password.extractExtraRegistrationParams( function (req) {\n  return {\n      phone: req.body.phone\n    , name: {\n          first: req.body.first_name\n        , last: req.body.last_name\n      }\n  };\n});\n```\n\nThen, you will have access to this data from within your configured\n`validateRegistration` and `registerUser`:\n\n```javascript\neveryauth.password\n  .validateRegistration( function (newUserAttributes) {\n    var phone = newUserAttributes.phone\n      , firstName = newUserAttributes.name.first\n      , lastName = newUserAttributes.name.last;\n  })\n  .registerUser( function (newUserAttributes) {\n    var phone = newUserAttributes.phone\n      , firstName = newUserAttributes.name.first\n      , lastName = newUserAttributes.name.last;\n  });\n```\n\n### Password Recipe 2: Logging in with email or phone number\n\nBy default, `everyauth` uses the field and user key name `login` during the\nregistration and login process.\n\nSometimes, you want to use `email` or `phone` instead of `login`. Moreover,\nyou also want to validate `email` and `phone` fields upon registration.\n\n`everyauth` provides an easy way to do this:\n\n```javascript\neveryauth.password.loginWith('email');\n\n// OR\n\neveryauth.password.loginWith('phone');\n```\n\nWith simple login configuration like this, you get email (or phone) validation\nin addition to renaming of the form field and user key corresponding to what\notherwise would typically be referred to as 'login'.\n\n### Password Recipe 3: Adding additional view local variables to login and registration views\n\nIf you are using `express`, you are able to pass variables from your app\ncontext to your view context via local variables. `everyauth` provides\nseveral convenience local vars for your views, but sometimes you will want\nto augment this set of local vars with additional locals.\n\nSo `everyauth` also provides a mechanism for you to do so via the following\nconfigurables:\n\n```javascript\neveryauth.password.loginLocals(...);\neveryauth.password.registerLocals(...);\n```\n\n`loginLocals` and `registerLocals` configuration have symmetrical APIs, so I\nwill only cover `loginLocals` here to illustrate how to use both.\n\nYou can configure this parameter in one of *3* ways. Why 3? Because there are 3 types of ways that you can retrieve your locals.\n\n1. Static local vars that never change values:\n   \n       ```javascript\n       everyauth.password.loginLocals({\n         title: 'Login'\n       });\n       ```\n2. Dynamic synchronous local vars that depend on the incoming request, but whose values are retrieved synchronously\n   \n       ```javascript\n       everyauth.password.loginLocals( function (req, res) {\n         var sess = req.session;\n         return {\n           isReturning: sess.isReturning\n         };\n       });\n       ```\n3. Dynamic asynchronous local vars\n   \n       ```javascript\n       everyauth.password.loginLocals( function (req, res, done) {\n         asyncCall( function ( err, data) {\n           if (err) return done(err);\n           done(null, {\n             title: il8n.titleInLanguage('Login Page', il8n.language(data.geo))\n           });\n         });\n       });\n       ```\n\n### Password Recipe 4: Customize Your Registration Validation\n\nBy default, `everyauth.password` automatically\n\n- validates that the login (or email or phone, depending on what you authenticate with -- see Password Recipe 2) is present in the login http request, \n- validates that the password is present\n- validates that an email login is a correctly formatted email\n- validates that a phone login is a valid phone number\n\nIf any of these validations fail, then the appropriate errors are generated and accessible to you in your view via the `errors` view local variable.\n\nIf you want to add additional validations beyond this, you can do so by configuring the step, `validateRegistration`:\n\n```javascript\neveryauth.password\n  .validateRegistration( function (newUserAttributes, baseErrors) {\n    // Here, newUserAttributes is the hash of parameters extracted from the incoming request.\n    // baseErrors is the array of errors generated by the default automatic validation outlined above\n    //   in this same recipe.\n\n    // First, validate your errors. Here, validateUser is a made up function\n    var moreErrors = validateUser( newUserAttributes );\n    if (moreErrors.length) baseErrors.push.apply(baseErrors, moreErrors);\n\n    // Return the array of errors, so your view has access to them.\n    return baseErrors;\n  });\n```\n\n### Password Recipe 5: Password Hashing\n\nBy default, everyauth is agnostic about how you decide to store your users and\ntherefore passwords. However, one should *always* use password hashing and\nsalting for security.\n\nHere's an example of how to incorporate password hashing into everyauth using\nbcrypt hashing. The idea is to store a salt and hash value inside your user object\ninstead of the password. The hash value is generated from the password (sent with a\nregistration or login request) and unique salt per user, using the bcrypt algorithm.\n\n```javascript\n// Make sure to `npm install bcrypt`\nvar bcrypt = require('bcrypt');\n\neveryauth.password\n  .registerUser( function (newUserAttrs) {\n    var promise = this.Promise()\n      , password = newUserAttrs.password;\n\n    delete newUserAttrs[password]; // Don't store password\n    newUserAttrs.salt = bcrypt.genSaltSync(10);\n    newUserAttrs.hash = bcrypt.hashSync(password, salt);\n\n    // Create a new user in your data store\n    createUser( newUserAttrs, function (err, createdUser) {\n      if (err) return promise.fail(err);\n      return promise.fulfill(createdUser);\n    });\n\n    return promise;\n  })\n  .authenticate( function (login, password) {\n    var promise\n      , errors = [];\n    if (!login) errors.push('Missing login.');\n    if (!password) errors.push('Missing password.');\n    if (errors.length) return errors;\n\n    promise = this.Promise();\n\n    // findUser passes an error or user to a callback after finding the\n    // user by login\n    findUser( login, function (err, user) {\n      if (err) {\n        errors.push(err.message || err);\n        return promise.fulfill(errors);\n      }\n      if (!user) {\n        errors.push('User with login ' + login + ' does not exist.');\n        return promise.fulfill(errors);\n      }\n      bcrypt.compare(password, user.hash, function (err, didSucceed) {\n        if (err) {\n          return promise.fail(err);\n          errors.push('Wrong password.');\n          return promise.fulfill(errors);\n        }\n        if (didSucceed) return promise.fulfill(user);\n        errors.push('Wrong password.');\n        return promise.fulfill(errors);\n      });\n    });\n\n    return promise;\n  })\n```\n\n## Other Modules\n\n### GitHub OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.github\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, githubUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n  \n```javascript\neveryauth.github\n  .entryPath('/auth/github')\n  .callbackPath('/auth/github/callback')\n  .scope('repo'); // Defaults to undefined\n                  // Can be set to a combination of: 'user', 'public_repo', 'repo', 'gist'\n                  // For more details, see http://develop.github.com/p/oauth.html\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.github.scope(); // undefined\neveryauth.github.entryPath(); // '/auth/github'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.github.configurable();\n```\n\n### Instagram OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.instagram\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, instagramUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.instagram\n  .entryPath('/auth/instagram')\n  .callbackPath('/auth/instagram/callback')\n  .scope('basic') // Defaults to 'basic'\n                  // Can be set to a combination of: 'basic', 'comments', 'relationships', 'likes'\n                  // For more details, see http://instagram.com/developer/auth/#scope\n  .display(undefined); // Defaults to undefined; Set to 'touch' to see a mobile optimized version\n                       // of the instagram auth page\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.instagram.callbackPath(); // '/auth/instagram/callback'\neveryauth.instagram.entryPath(); // '/auth/instagram'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.instagram.configurable();\n```\n\n### Foursquare OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.foursquare\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, foursquareUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.foursquare\n  .entryPath('/auth/foursquare')\n  .callbackPath('/auth/foursquare/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.foursquare.callbackPath(); // '/auth/foursquare/callback'\neveryauth.foursquare.entryPath(); // '/auth/foursquare'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.foursquare.configurable();\n```\n\n### LinkedIn OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.linkedin\n  .consumerKey('YOUR CONSUMER ID HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenSecret, linkedinUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.linkedin\n  .entryPath('/auth/linkedin')\n  .callbackPath('/auth/linkedin/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.linkedin.callbackPath(); // '/auth/linkedin/callback'\neveryauth.linkedin.entryPath(); // '/auth/linkedin'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.linkedin.configurable();\n```\n\n### Google OAuth2\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.google\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .scope('https://www.google.com/m8/feeds') // What you want access to\n  .handleAuthCallbackError( function (req, res) {\n    // If a user denies your app, Google will redirect the user to\n    // /auth/facebook/callback?error=access_denied\n    // This configurable route handler defines how you want to respond to\n    // that.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, googleUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.google\n  .entryPath('/auth/google')\n  .callbackPath('/auth/google/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.google.scope(); // undefined\neveryauth.google.entryPath(); // '/auth/google'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.google.configurable();\n```\n\n### Gowalla OAuth2\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.gowalla\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .handleAuthCallbackError( function (req, res) {\n    // TODO - Update this documentation\n    // This configurable route handler defines how you want to respond to\n    // a response from Gowalla that something went wrong during the oauth2 process.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, gowallaUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.gowalla\n  .entryPath('/auth/gowalla')\n  .callbackPath('/auth/gowalla/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.gowalla.scope(); // undefined\neveryauth.gowalla.entryPath(); // '/auth/gowalla'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.gowalla.configurable();\n```\n\n### 37signals (Basecamp, Highrise, Backpack, Campfire) OAuth2\n\nFirst, register an app at [integrate.37signals.com](https://integrate.37signals.com).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth['37signals']\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .handleAuthCallbackError( function (req, res) {\n    // TODO - Update this documentation\n    // This configurable route handler defines how you want to respond to\n    // a response from 37signals that something went wrong during the oauth2 process.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, _37signalsUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth['37signals']\n  .entryPath('/auth/37signals')\n  .callbackPath('/auth/37signals/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth['37signals'].entryPath(); // '/auth/37signals'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth['37signals'].configurable();\n```\n\n### AngelList OAuth2\n\nFirst, register an app [on AngelList](http://angel.co/api/oauth/clients).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.angellist\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR TOKEN HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, angelListUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.angellist\n  .entryPath('/auth/angellist')\n  .callbackPath('/auth/angellist/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.angellist.entryPath(); // '/auth/angellist'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.angellist.configurable();\n```\n\n### Dwolla OAuth2\n\nFirst, register an app [on Dwolla](http://www.dwolla.com/developers).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.dwolla\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR TOKEN HERE')\n  .scope('accountinfofull')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, dwollaUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n```\n\n### Skyrock OAuth\n\nFirst, register an app [on Skyrock](http://www.skyrock.com/developer/).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.skyrock\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, skyrockUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### VKontakte OAuth2\n\nFirst, register an app [on VKontakte](http://vk.com/editapp?act=create\u0026site=1).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.vkontakte\n  .appId('YOUR APP ID HERE')\n  .appSecret('YOUR TOKEN HERE')\n  .scope('photo')\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, vkUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes)\n).listen(3000);\n```\n\n### Mail.ru OAuth2\n\nFirst, register an app [on mail.ru](http://api.mail.ru/apps/my/add/).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.mailru\n    .appId('YOUR CONSUMER KEY HERE')\n    .appSecret('YOUR CONSUMER SECRET HERE')\n    .scope('messages')\n    .entryPath('/auth/mailru')\n    .callbackPath('/auth/mailru/callback')\n    .findOrCreateUser( function (session, accessToken, accessTokenExtra, mailruUser)  {\n          // find or create user logic goes here\n          // Return a user or Promise that promises a user\n          // Promises are created via\n          // var promise = this.Promise();\n          // return promise;\n    })\n    .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### Yahoo OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.yahoo\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (session, accessToken, accessTokenSecret, yahooUserMetadata) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.yahoo\n  .entryPath('/auth/yahoo')\n  .callbackPath('/auth/yahoo/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.yahoo.callbackPath(); // '/auth/yahoo/callback'\neveryauth.yahoo.entryPath(); // '/auth/yahoo'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.yahoo.configurable();\n```\n\n### Readability OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.readability\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, reader) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByReadabilityId[reader.username] || (usersByReadabilityId[reader.username] = reader);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.readability\n  .entryPath('/auth/readability')\n  .callbackPath('/auth/readability/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.readability.callbackPath(); // '/auth/readability/callback'\neveryauth.readability.entryPath(); // '/auth/readability'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.readability.configurable();\n```\n\n### Dropbox OAuth\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.dropbox\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByDropboxId[user.uid] || (usersByDropboxId[user.uid] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.dropbox\n  .entryPath('/auth/dropbox')\n  .callbackPath('/auth/dropbox/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.dropbox.callbackPath(); // '/auth/dropbox/callback'\neveryauth.dropbox.entryPath(); // '/auth/dropbox'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.dropbox.configurable();\n```\n\n### Justin.tv OAuth\n\n[Sign up for a Justin.tv account](http://www.justin.tv/user/signup) and activate it as a [developer account](http://www.justin.tv/developer/activate) to get your consumer key and secret.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n  \neveryauth.justintv\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, justintvUser) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByJustintvId[justintvUser.id] || (usersByJustintvId[justintvUser.id] = justintvUser);\n  })\n  .redirectPath('/');\n  \nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nThe `justintvUser` parameter in the `.findOrCreateUser()` function above returns the `account/whoami` API call\n\n[Justin.tv API Wiki - Account/whoami](http://apiwiki.justin.tv/mediawiki/index.php/Account/whoami)\n\n```javascript\n{\n   \"image_url_huge\": \"http:\\/\\/static-cdn.justin.tv\\/jtv_user_pictures\\/justin-320x240-4.jpg\",\n   \"profile_header_border_color\": null,\n   \"favorite_quotes\": \"I love Justin.tv\",\n   \"sex\": \"Male\",\n   \"image_url_large\": \"http:\\/\\/static-cdn.justin.tv\\/jtv_user_pictures\\/justin-125x94-4.jpg\",\n   \"profile_about\": \"Check out my website:\\n\\nwww.justin.tv\\n\",\n   \"profile_background_color\": null,\n   \"image_url_medium\": \"http:\\/\\/static-cdn.justin.tv\\/jtv_user_pictures\\/justin-75x56-4.jpg\",\n   \"id\": 1698,\n   \"broadcaster\": true,\n   \"profile_url\": \"http:\\/\\/www.justin.tv\\/justin\\/profile\",\n   \"profile_link_color\": null,\n   \"image_url_small\": \"http:\\/\\/static-cdn.justin.tv\\/jtv_user_pictures\\/justin-50x37-4.jpg\",\n   \"profile_header_text_color\": null,\n   \"name\": \"The JUST UN\",\n   \"image_url_tiny\": \"http:\\/\\/static-cdn.justin.tv\\/jtv_user_pictures\\/justin-33x25-4.jpg\",\n   \"login\": \"justin\",\n   \"profile_header_bg_color\": null,\n   \"location\": \"San Francisco\"\n}\n```\n\nYou can also configure more parameters (most are set to defaults) via the same chainable API:\n\n```javascript\neveryauth.justintv\n  .entryPath('/auth/justintv')\n  .callbackPath('/auth/justintv/callback');\n```\n\nIf you want to see what the current value of a configured parameter is, you can do so via:\n\n```javascript\neveryauth.justintv.callbackPath(); // '/auth/justintv/callback'\neveryauth.justintv.entryPath(); // '/auth/justintv'\n```\n\nTo see all parameters that are configurable, the following will return an object whose parameter name keys map to description values:\n\n```javascript\neveryauth.justintv.configurable();\n```\n\n### Vimeo OAuth\n\nYou will first need to sign up for a [developer application](http://vimeo.com/api/applications) to get the consumer key and secret.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.vimeo\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByVimeoId[user.id] || (usersByVimeoId[user.id] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.vimeo\n  .entryPath('/auth/vimeo')\n  .callbackPath('/auth/vimeo/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.vimeo.callbackPath(); // '/auth/vimeo/callback'\neveryauth.vimeo.entryPath(); // '/auth/vimeo'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.vimeo.configurable();\n```\n\n### Tumblr OAuth (1.a)\n\nYou will first need to [register an app](http://www.tumblr.com/oauth/register) to get the consumer key and secret.\nDuring registration of your new app, enter a \"Default callback URL\" of \"http://\u003chostname\u003e:\u003cport\u003e/auth/tumblr/callback\".\nOnce you register your app, copy down your \"OAuth Consumer Key\" and \"Secret Key\" and proceed below.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.tumblr\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByTumblrName[user.name] || (usersByTumblrName[user.name] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.tumblr\n  .entryPath('/auth/tumblr')\n  .callbackPath('/auth/tumblr/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.tumblr.callbackPath(); // '/auth/tumblr/callback'\neveryauth.tumblr.entryPath(); // '/auth/tumblr'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.tumblr.configurable();\n```\n\n### Evernote OAuth (1.a)\n\nYou will first need to [request an API key](http://www.evernote.com/about/developer/api/#key) to get the consumer key and secret.  Note that this consumer key and secret will only be valid for the sandbox rather than the production OAuth host.  By default the Evernote module will use the production host, so you'll need to override this using the chainable API if you're using the sandbox.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.evernote\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByEvernoteId[user.userId] || (usersByEvernoteId[user.userId] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.evernote\n  .oauthHost('https://sandbox.evernote.com')\n  .entryPath('/auth/evernote')\n  .callbackPath('/auth/evernote/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.evernote.oauthHost(); // 'https://sandbox.evernote.com'\neveryauth.evernote.callbackPath(); // '/auth/evernote/callback'\neveryauth.evernote.entryPath(); // '/auth/evernote'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.evernote.configurable();\n```\n\n### OpenStreetMap OAuth\n\nYou will first need to [login to OpenStreetMap](http://www.openstreetmap.org). Then register you application on your OpenStreetMap user page via the View my OAuth details link on the bottom of the page to get the consumer key and secret. The registered application does not need any permission listed there to login via OAuth.\n\n```javascript\nvar everyauth = require('osm')\n  , connect = require('connect');\n\neveryauth.osm\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByOSMId[user.id] || (usersByOSMId[user.id] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.osm\n  .oauthHost('http://api06.dev.openstreetmap.org')\n  .entryPath('/auth/osm')\n  .callbackPath('/auth/osm/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.osm.oauthHost(); // 'http://api.openstreetmap.org'\neveryauth.osm.callbackPath(); // '/auth/osm/callback'\neveryauth.osm.entryPath(); // '/auth/osm'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.osm.configurable();\n```\n\n### TripIt OAuth (1.0)\n\nObtain consumer key and consumer secret for your app by [registering it](http://www.tripit.com/developer/create).\nPlease note that TripIt is using _API Key_ and _API Secret_ terminology: use those values as describe below.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.tripit\n  .consumerKey('YOUR API KEY')\n  .consumerSecret('YOUR API SECRET')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, tripitProfile) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### 500px OAuth (1.0)\n\nYou will first need to [request an API key](http://developer.500px.com/oauth_clients/new) to get the consumer key and secret.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth['500px']\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersBy500pxId[user.userId] || (usersBy500pxId[user.userId] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### SoundCloud OAuth2\n\nYou will first need to [register an app](http://soundcloud.com/you/apps) to get the client id and secret.\nDuring registration of your new app, enter a \"Default callback URL\" of \"http://\u003chostname\u003e:\u003cport\u003e/auth/soundcloud/callback\".\nOnce you register your app, copy down your \"Client ID\" and \"Client Secret\" and proceed below.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.soundcloud\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .handleAuthCallbackError( function (req, res) {\n    // TODO - Update this documentation\n    // This configurable route handler defines how you want to respond to\n    // a response from SoundCloud that something went wrong during the oauth2 process.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, soundcloudUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.soundcloud\n  .entryPath('/auth/soundcloud')\n  .callbackPath('/auth/soundcloud/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.soundcloud.scope(); // undefined\neveryauth.soundcloud.display(); // undefined\neveryauth.soundcloud.entryPath(); // '/auth/soundcloud'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.soundcloud.configurable();\n```\n\n### mixi OAuth2\n\nFirst, register an app [on mixi](http://developer.mixi.co.jp).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.mixi\n  .appId('YOUR CONSUMER KEY HERE')\n  .appSecret('YOUR CONSUMER SECRET HERE')\n  .display('pc') //specify device types of access: See http://developers.mixi.co.jp/\n  .scope('r_profile') //specify types of access: See http://developers.mixi.co.jp/\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, mixiUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n```\n\n### Mailchimp OAuth2\n\nFirst, register an app [in Mailchimp](http://login.mailchimp.com).\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.mailchimp\n  .appId('YOUR CLIENT KEY HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .myHostname(process.env.HOSTNAME || \"http://127.0.0.1:3000\")//MC requires 127.0.0.1 for dev\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, mailchimpUserData) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n    // The mailchimpUserData object contains everything from the API method getAccountDetails and an apikey. \n    // You'll want to work with mailchimpUserData.user_id for queries\n    // and mailchimpUserData.apikey for your API wrapper\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### Mendeley OAuth (1.0)\n\nYou will first need to [register your application](http://dev.mendeley.com/applications/register/) to get the consumer key and secret.\n\n```javascript\neveryauth.mendeley\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .findOrCreateUser( function (sess, accessToken, accessSecret, user) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByMendeleyId[user.main.profile_id] || (usersByMendeleyId[user.main.profile_id] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### OpenID protocol\n\nOpenID protocol allows you to use an openid auth request. You can read more information about it here http://openid.net/\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.openid\n  .myHostname('http://localhost:3000')\n  .simpleRegistration({\n      \"nickname\" : true\n    , \"email\"    : true\n    , \"fullname\" : true\n    , \"dob\"      : true\n    , \"gender\"   : true\n    , \"postcode\" : true\n    , \"country\"  : true\n    , \"language\" : true\n    , \"timezone\" : true\n  })\n\t.attributeExchange({\n      \"http://axschema.org/contact/email\"       : \"required\"\n    , \"http://axschema.org/namePerson/friendly\" : \"required\"\n    , \"http://axschema.org/namePerson\"          : \"required\"\n    , \"http://axschema.org/namePerson/first\"    : \"required\"\n    , \"http://axschema.org/contact/country/home\": \"required\"\n    , \"http://axschema.org/media/image/default\" : \"required\"\n    , \"http://axschema.org/x/media/signature\"   : \"required\"\n  })\n  .openidURLField('openid_identifier'); //The POST variable used to get the OpenID\n  .findOrCreateUser( function(session, openIdUserAttributes) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### Google OpenID+OAuth Hybrid protocol\n\nOpenID+OAuth Hybrid protocol allows you to combine an openid auth request with a oauth access request. You can read more information about it here http://code.google.com/apis/accounts/docs/OpenID.html\n\nRegister your domain with Google\n[here](https://accounts.google.com/ManageDomains) and write down the\nconsumer key and consumer secret generated during the domain registration.\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.googlehybrid\n  .consumerKey('YOUR CONSUMER KEY HERE')\n  .consumerSecret('YOUR CONSUMER SECRET HERE')\n  .scope(['GOOGLE API SCOPE','GOOGLE API SCOPE'])\n  .findOrCreateUser( function(session, userAttributes) {\n    // find or create user logic goes here\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### Box.net\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.box\n  .apiKey('YOUR API KEY')\n  .findOrCreateUser( function (sess, authToken, boxUser) {\n    // find or create user logic goes here\n    //\n    // e.g.,\n    // return usersByBoxId[user.user_id] || (usersByBoxId[user.user_id] = user);\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.box\n  .entryPath('/auth/box')\n  .callbackPath('/auth/box/callback');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.box.callbackPath(); // '/auth/box/callback'\neveryauth.box.entryPath(); // '/auth/box'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.box.configurable();\n```\n\n### LDAP\n\nThe LDAP module is not tested throughly yet, however it is used in production by some organizations already. Feedback is very welcome.\n\nInstall OpenLDAP client libraries:\n\n    $ sudo apt-get install ldap-utils\n\nInstall [node-ldapauth](https://github.com/marek-obuchowicz/node-ldapauth):\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.ldap\n  .ldapUrl('ldap(s)://your.ldap.host')\n  .adminDn('DN for bind')\n  .adminPassword('Password for bind user')\n  .searchBase('e.g. ou=users,dc=example,dc=com')\n  .searchFilter('e.g. (uid={{username}})')\n  .requireGroupDn('e.g. cn=Administrators,ou=Groups,dc=example,dc=com')\n\n  // The `ldap` module inherits from the `password` module, so \n  // refer to the `password` module instructions several sections above\n  // in this README.\n  // You do not need to configure the `authenticate` step as instructed\n  // by `password` because the `ldap` module already does that for you.\n  // Moreover, all the registration related steps and configurable parameters\n  // are no longer valid\n  .getLoginPath(...)\n  .postLoginPath(...)\n  .loginView(...)\n  .loginSuccessRedirect(...);\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\n### Windows Azure Access Control Service (ACS)\n\nYou will need to create a [Windows Azure ACS namespace](http://msdn.microsoft.com/en-us/library/windowsazure/hh674478.aspx). The only caveat when creating the namespace is setting the \"Return URL\". You will probably [create one Relying Party](http://msdn.microsoft.com/en-us/library/windowsazure/gg429779.aspx) for each environment (dev, qa, prod) and each of them will have a different \"Return URL\". For instance, dev will be `http://localhost:port/auth/azureacs/callback` and prod could be `https://myapp.com/auth/azureacs/callback` (notice the `/auth/azureacs/callback`, that's where the module will listen the POST with the token from ACS)\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.azureacs\n      .identityProviderUrl('https://YOURNAMESPACE.accesscontrol.windows.net/v2/wsfederation/')\n      .entryPath('/auth/azureacs')\n      .callbackPath('/auth/azureacs/callback')\n      .signingKey('d0jul....YOUR_SIGNINGK=_KEY......OEvz24=')\n      .realm('YOUR_APPLICATION_REALM_IDENTIFIER')\n      .homeRealm('') // if you want to use a default idp (like google/liveid)\n      .tokenFormat('swt')  // only swt supported for now\n      .findOrCreateUser( function (session, acsUser) {\n         // you could enrich the \"user\" entity by storing/fetching the user from a db\n        return null;\n      });\n      .redirectPath('/');\n\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.box.callbackPath(); // '/auth/azureacs/callback'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.box.configurable();\n```\n\n### Shopify\n\n```javascript\nvar everyauth = require('../index') //require('everyauth')\n  , express = require('express');\n\neveryauth\n  .shopify\n    .apiHost('https://SHOPNAME.myshopify.com') \n    .oauthHost('https://SHOPNAME.myshopify.com') \n    .appId('YOUR APP API KEY')\n    .appSecret('YOUR APP SHARED SECRET')\n\n    //Shopify requires scope, even if you only want to use default scope\n    .scope('read_products,write_themes') \n    .findOrCreateUser( function (sess, accessToken, accessSecret, shopifyUser) {\n      // find or create user logic goes here\n    })\n    .redirectPath(\"/\");\n\nvar app = express();\n\napp.use(express.bodyParser())\n  .use(express.cookieParser('whodunnit'))\n  .use(express.session())\n  .use(everyauth.middleware(app));\n\napp.get('/', function (req, res) {\n\n});\n\napp.listen(3000);\n```\n\n### Stripe\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.stripe\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .scope('read_only') // Defaults to read_only - can be set to 'read_write'.  See https://stripe.com/docs/connect/reference\n  .landing('login') //Defaults to login - can be set to 'register'.  See https://stripe.com/docs/connect/reference\n  .handleAuthCallbackError( function (req, res) {\n    // If a user denies your app, Stripe will redirect the user to\n    // /auth/facebook/callback?error=access_denied\n    // This configurable route handler defines how you want to respond to\n    // that.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, stripeUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.stripe\n  .entryPath('/auth/stripe')\n  .callbackPath('/auth/stripe/callback')\n  .redirectPath('/auth/stripe');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.stripe.scope(); // undefined\neveryauth.stripe.entryPath(); // '/auth/stripe'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.stripe.configurable();\n```\n\n### Salesforce\n\n```javascript\nvar everyauth = require('everyauth')\n  , connect = require('connect');\n\neveryauth.salesforce\n  .appId('YOUR CLIENT ID HERE')\n  .appSecret('YOUR CLIENT SECRET HERE')\n  .scope('api refresh_token') // Is none are set, it defaults to 'id api refresh_token') - see http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com\n  .handleAuthCallbackError( function (req, res) {\n    // If a user denies your app, Salesforce will redirect the user to\n    // /auth/facebook/callback?error=access_denied\n    // This configurable route handler defines how you want to respond to\n    // that.\n    // If you do not configure this, everyauth renders a default fallback\n    // view notifying the user that their authentication failed and why.\n  })\n  .findOrCreateUser( function (session, accessToken, accessTokenExtra, salesforceUserMetadata) {\n    // find or create user logic goes here\n    // Return a user or Promise that promises a user\n    // Promises are created via\n    //     var promise = this.Promise();\n  })\n  .redirectPath('/');\n\nvar routes = function (app) {\n  // Define your routes here\n};\n\nconnect(\n    connect.bodyParser()\n  , connect.cookieParser()\n  , connect.session({secret: 'whodunnit'})\n  , everyauth.middleware()\n  , connect.router(routes);\n).listen(3000);\n```\n\nYou can also configure more parameters (most are set to defaults) via\nthe same chainable API:\n\n```javascript\neveryauth.salesforce\n  .entryPath('/auth/salesforce')\n  .callbackPath('/auth/salesforce/callback')\n  .redirectPath('/auth/salesforce');\n```\n\nIf you want to see what the current value of a\nconfigured parameter is, you can do so via:\n\n```javascript\neveryauth.salesforce.scope(); // undefined\neveryauth.salesforce.entryPath(); // '/auth/salesforce'\n```\n\nTo see all parameters that are configurable, the following will return an\nobject whose parameter name keys map to description values:\n\n```javascript\neveryauth.salesforce.configurable();\n```\n\n## Configuring a Module\n\neveryauth was built with powerful configuration needs in mind.\n\nEvery module comes with a set of parameters that you can configure\ndirectly. To see a list of those parameters on a per module basis, \nwith descriptions about what they do, enter the following into the \nnode REPL (to access the REPL, just type `node` at the command line)\n\n    \u003e var ea = require('everyauth');\n    \u003e ea.facebook.configurable();\n\nFor example, you will see that one of the configuration parameters is\n`moduleTimeout`, which is described to be `how long to wait per step\nbefore timing out and invoking any timeout callbacks`\n\nEvery configuration parameter corresponds to a method of the same name\non the auth module under consideration (i.e., in this case\n`ea.facebook`). To create or over-write that parameter, just\ncall that method with the new value as the argument:\n\n```javascript\nea.facebook\n  .moduleTimeout( 4000 ); // Wait 4 seconds before timing out any step\n                          // involved in the facebook auth process\n```\n\nConfiguration parameters can be scalars. But they can be anything. For\nexample, they can also be functions, too. The facebook module has a \nconfigurable step named `findOrCreateUser` that is described as \n\"STEP FN [findOrCreateUser] function encapsulating the logic for the step\n`fetchOAuthUser`.\". What this means is that this configures the \nfunction (i.e., \"FN\") that encapsulates the logic of this step.\n\n```javascript\nea.facebook\n  .findOrCreateUser( function (session, accessToken, extra, oauthUser) {\n    // find or create user logic goes here\n  });\n```\n\nHow do we know what arguments the function takes?\nWe elaborate more about step function configuration in our \n`Introspection` section below.\n\n### For coffee-script lovers\n\nEveryauth also supports a special method `configure` for coffee-script\naficionados. Coffee and chainable APIs often don't mix well. As an alternative,\nyou can configure an everyauth module using an `Object` passed to `configure`:\n\n```coffee\neveryauth.dropbox.configure\n  consumerKey:       conf.dropbox.consumerKey\n  consumerSecret:    conf.dropbox.consumerSecret\n  findOrCreateUser:  (sess, accessToken, accessSecret, dbMeta) -\u003e users[dbMeta.uid] or= addUser('dropbox', dbMeta)\n  redirectPath:      '/'\n```\n\n## Introspection\n\neveryauth provides convenient methods and getters for finding out\nabout any module.\n\nShow all configurable parameters with their descriptions:\n\n```javascript\neveryauth.facebook.configurable();\n```\n\nShow the value of a single configurable parameter:\n\n```javascript\n// Get the value of the configurable callbackPath parameter\neveryauth.facebook.callbackPath(); // =\u003e '/auth/facebook/callback'\n```\n\nShow the declared routes (pretty printed):\n\n```javascript\neveryauth.facebook.routes;\n```\n\nShow the steps initiated by a given route:\n\n```javascript\neveryauth.facebook.route.get.entryPath.steps; \neveryauth.facebook.route.get.callbackPath.steps;\n```\n\nSometimes you need to set up additional steps for a given auth\nmodule, by defining that step in your app. For example, the\nset of steps triggered when someone requests the facebook\nmodule's `callbackPath` contains a step that you must define\nin your app. To see what that step is, you can introspect\nthe `callbackPath` route with the facebook module.\n\n```javascript\neveryauth.facebook.route.get.callbackPath.steps.incomplete;\n// =\u003e [ { name: 'findOrCreateUser',\n//        error: 'is missing: its function' } ]\n```\n\nThis tells you that you must define the function that defines the\nlogic for the `findOrCreateUser` step. To see what the function \nsignature looks like for this step:\n\n```javascript\nvar matchingStep =\neveryauth.facebook.route.get.callbackPath.steps.filter( function (step) {\n  return step.name === 'findOrCreateUser';\n})[0];\n// { name: 'findOrCreateUser',\n//   accepts: [ 'session', 'accessToken', 'extra', 'oauthUser' ],\n//   promises: [ 'user' ] }\n```\n\nThis tells you that the function should take the following 4 arguments:\n\n```javascript\nfunction (session, accessToken, extra, oauthUser) {\n  ...\n}\n```\n\nAnd that the function should return a `user` that is a user object or\na Promise that promises a user object.\n\n```javascript\n// For synchronous lookup situations, you can return a user\nfunction (session, accessToken, extra, oauthUser) {\n  ...\n  return { id: 'some user id', username: 'some user name' };\n}\n\n// OR\n\n// For asynchronous lookup situations, you must return a Promise that\n// will be fulfilled with a user later on\nfunction (session, accessToken, extra, oauthUser) {\n  var promise = this.Promise();\n  asyncFindUser( function (err, user) {\n    if (err) return promise.fail(err);\n    promise.fulfill(user);\n  });\n  return promise;\n}\n```\n\nYou add this function as the block for the step `findOrCreateUser` just like\nyou configure any other configurable parameter in your auth module:\n\n```javascript\neveryauth.facebook\n  .findOrCreateUser( function (session, accessToken, extra, oauthUser) {\n    // Logic goes here\n  });\n```\n\nThere are also several other introspection tools at your disposal:\n\nFor example, to show the submodules of an auth module by name:\n\n```javascript\neveryauth.oauth2.submodules;\n```\n\nOther introspection tools to describe (explanations coming soon):\n\n- *Invalid Steps*\n    \n    ```javascript\n    everyauth.facebook.routes.get.callbackPath.steps.invalid\n    ```\n\n## Debugging\n\n### Debugging - Logging Module Steps\n\nTo turn on debugging:\n\n```javascript\neveryauth.debug = true;\n```\n\nEach everyauth auth strategy module is composed of steps. As each step begins and ends, everyauth will print out to the console the beginning and end of each step. So by turning on the debug flag, you get insight into what step everyauth is executing at any time.\n\nFor example, here is some example debugging information output to the console\nduring a Facebook Connect authorization:\n\n```\nstarting step - getAuthUri\n...finished step\nstarting step - requestAuthUri\n...finished step\nstarting step - getCode\n...finished step\nstarting step - getAccessToken\n...finished step\nstarting step - fetchOAuthUser\n...finished step\nstarting step - getSession\n...finished step\nstarting step - findOrCreateUser\n...finished step\nstarting step - compile\n...finished step\nstarting step - addToSession\n...finished step\nstarting step - sendResponse\n...finished step\n```\n\n### Debugging - Configuring Error Handling\n\nBy default, all modules handle errors by throwing them. That said, `everyauth` allows\nyou to over-ride this behavior.\n\nYou can configure error handling at the module and step level. To handle *all*\nerrors in the same manner across all auth modules that you use, do the following.\n\n```javascript\neveryauth.everymodule.moduleErrback( function (err) {\n  // Do something with the err -- e.g., log it, throw it\n});\n```\n\nYou can also configure your error handling on a per module basis. So, for example, if\nyou want to handle errors during the Facebook module differently than in other modules:\n\n\n```javascript\neveryauth.facebook.moduleErrback( function (err) {\n  // Do something with the err -- e.g., log it, throw it\n});\n```\n\n### Debugging - Setting Timeouts\n\nBy default, every module has 10 seconds to complete each step. If a step takes longer than 10 seconds to complete, then everyauth will pass a timeout error to your configured error handler (see section \"Configure Error Handling\" above).\n\nIf you would like to increase or decrease the timeout period across all modules, you can do so via:\n\n```javascript\neveryauth.everymodule.moduleTimeout(2000); // Wait 2 seconds per step instead before timing out\n```\n\nYou can eliminate the timeout altogether by configuring your timeouts to -1:\n\n```javascript\neveryauth.everymodule.moduleTimeout(-1);\n```\n\nYou can also configure the timeout period on a per module basis. For example, the following will result in the facebook module having 3 seconds to complete each step before timing out; all other modules will have the default 10 seconds per step before timing out.\n\n```javascript\neveryauth.facebook.moduleTimeout(3000); // Wait 3 seconds\n```\n\n## In the Wild\n\nThe following projects use everyauth.\n\nIf you are using everyauth in a project, app, or module, get on the list below\nby getting in touch or submitting a pull request with changes to the README.\n\n### Startups \u0026 Apps\n\n- [Storify](http://storify.com/)\n- [DoodleOrDie](http://doodleordie.com/)\n- [Furkot](http://trips.furkot.com/)\n\n### Modules\n\n- [mongoose-auth](https://github.com/bnoguchi/mongoose-auth) Authorization plugin\n  for use with the node.js MongoDB orm.\n- [Heroku's Facebook Node.JS\n  Template](https://github.com/heroku/facebook-template-nodejs)\n- [node-express-boilerplate](https://github.com/mape/node-express-boilerplate)\n- [ExpressStarter](https://github.com/JustinBeckwith/ExpressStarter)\n\n## Tutorials\n\nThe following are 3rd party screencasts and blog posts about either getting up\nand running with everyauth or writing your own everyauth modules to support a\nnew service.\n\nIf you would like your blog post to be included, please submit a pull request\nwith changes to the README.\n\n- [NodeTuts: Starting with everyauth](http://nodetuts.com/tutorials/26-starting-with-everyauth.html#video)\n- [Node.js modules you should know about:\n  everyauth](http://www.catonmat.net/blog/nodejs-modules-everyauth/)\n- [Implementing Windows Azure ACS with\n  everyauth](http://nodeblog.cloudapp.net/implementing-windows-azure-acs-with-everyauth)\n- [OAuth: Logging In with EveryAuth and NodeJS](http://blog.koostudios.com/?p=453)\n- [Calling the github API with node.js](http://www.garann.com/dev/2011/calling-the-github-api-with-node-js/)\n- [Simple Node.js Express MVR Template](http://benedmunds.com/2012/04/19/simple-nodejs-express-mvr-template/)\n\n---\n## Author\nBrian Noguchi\n\n## Credits\n\nThanks to the following contributors for the following modules:\n\n- [RocketLabs Development](https://github.com/rocketlabsdev) for contributing\n  - OpenId\n  - Google Hybrid\n- [Andrew Mee](https://github.com/starfishmod)\n  - OpenId\n- [Alfred Nerstu](https://github.com/alfrednerstu)\n  - Readability\n- [Torgeir](https://github.com/torgeir)\n  - DropBox\n- [slickplaid](https://github.com/slickplaid)\n  - Justin.tv\n  - Vimeo\n- [Andrew Kramolisch](https://github.com/andykram)\n  - Gowalla\n- [Kenan Shifflett](https://github.com/nanek)\n  - Dwolla\n- [Alexey Simonenko](https://github.com/meritt)\n  - VKontakte\n- [Alexey Gordeyev](https://github.com/biggora)\n  - Mail.ru\n- [Rodolphe Stoclin](https://github.com/srod)\n  - Skyrock\n- [Danny Amey](https://github.com/dannyamey)\n  - 500px\n  - Evernote\n- [Chris Leishman](https://github.com/chrisleishman)\n  - SoundCloud\n\n## MIT License\nCopyright (c) 2011 by Brian Noguchi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":["Web 后端","JavaScript","Packages","Number"],"sub_categories":["Authentication"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnoguchi%2Feveryauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnoguchi%2Feveryauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnoguchi%2Feveryauth/lists"}