2

I want to setup social authentication on my Sails app using sails-auth but my generator doesnt work.

here my .sailsrc

{
   "generators": {
   "modules": {
      "auth-api": "sails-auth"
   }
 }}

on terminal sails generate auth-api like the documentation, and this is the error No generator calledauth-apifound; perhaps you meantsails generate api auth-api?`

thanks for all

DJeanCar
  • 1,463
  • 1
  • 11
  • 13

2 Answers2

0

I had the same issue. My mistake was that I ran the "npm install sails-auth --save" command not in the newly generated sails project directory. See if that is the issue.

harryhorn
  • 892
  • 6
  • 8
0

After installing sails-auth you should configure config/passport.js and config/auth.js. Try looking at How to use sails-auth in sails project? this answer.