trailsjs / sails-auth

Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.
https://www.npmjs.org/package/sails-auth
MIT License
265 stars 141 forks source link

Controllers/etc to be loaded by marlinspike hook appear not to be loaded #102

Closed danielsharvey closed 8 years ago

danielsharvey commented 8 years ago

I'm using

"sails": "~0.12.0-rc3",
"sails-auth": "^2.1.1"
"marlinspike": "0.12.13"

running on Node v4.1.2 but am having problem.

Lifting sails states in logging that it is loading models/controllers etc for sails-auth but they are not loaded:

debug: hookPath: /home/daniel/crypto/projects/x/sails-getting-started/test-node-4.1.1/node_modules/sails-auth/dist/api/hooks/auth
debug: marlinspike (auth): loading config from /home/daniel/crypto/projects/x/sails-getting-started/test-node-4.1.1/node_modules/sails-auth/dist/config
debug: marlinspike (auth): loading Services from /home/daniel/crypto/projects/x/sails-getting-started/test-node-4.1.1/node_modules/sails-auth/dist/api/services... 
debug: marlinspike (auth): loading Models...
debug: marlinspike (auth): loading Controllers...
XXXX {"Auth":{},"User":{}}
debug: marlinspike (auth): loading Policies...

To test this, I manually copied ./node_modules/sails-auth/dist/api/controllers/UserController.js into ./api/controllers/. This works.

Any pointers?

Note that:

  1. Sails is installed in local node_modules.
  2. I needed to patch sails as per https://github.com/balderdashy/sails/issues/3176 and https://github.com/balderdashy/sails/commit/8f2a38ba5defc0e2a57c15ca6e6cc1a507055c1a
btkostner commented 8 years ago

Same here.

"marlinspike": "^0.12.14" "sails": "~0.12.0-rc3" "sails-auth": "~2.1.1"

Node version: v4.2.1

debug: hookPath: /home/btkostner/Projects/Web/windshield/node_modules/sails-auth/dist/api/hooks/auth
debug: marlinspike (auth): loading config from /home/btkostner/Projects/Web/windshield/node_modules/sails-auth/dist/config
debug: marlinspike (auth): loading Services from /home/btkostner/Projects/Web/windshield/node_modules/sails-auth/dist/api/services...
debug: marlinspike (auth): loading Models...
debug: marlinspike (auth): loading Controllers...
debug: marlinspike (auth): loading Policies...

No route are working, nor any log messages besides the above ones.

Patched due to balderdashy/sails#3176

danielsharvey commented 8 years ago

It seems to me that marlinspike needs the latest sails. I managed to make some progress using master:

npm install sails@git://github.com/balderdashy/sails.git#master

What I'm using:

"marlinspike": "0.12.13"
"sails-auth": "^2.1.1",
"sails-permissions": "^2.1.8"

A little bit bleeding edge but the only thing I could get to work.

btkostner commented 8 years ago

Can confirm, using:

"marlinspike": "^0.12.14"
"sails": "git://github.com/balderdashy/sails.git#master"
"sails-auth": "~2.1.1"

sails-auth works without any further problems.