sails.js with passport-twitter sails.js with passport-twitter express express

sails.js with passport-twitter


Did you try sails-generate-auth with sails 0.10? It makes life easier from my point of view: https://www.npmjs.org/package/sails-generate-auth


check out one example how to do Twitter auth (google, facebook, github are there as well):https://github.com/stefanbuck/sails-social-auth-example


I recommend that you don't spend time integrating this yourself. There are a number of existing solutions. The official documentation lists several options:

  • sails-auth: Passport-based Authentication Extension, including Basic Auth
  • sails-permissions: Permissions and Entitlements system for sails.js: supports user authentication with passport.js, role-based permissioning, object ownership, and row-level security.
  • sails-generate-auth: Generate a Passport.js authentication layer for your Sails app