sails-hook-jwt-auth icon indicating copy to clipboard operation
sails-hook-jwt-auth copied to clipboard

missing policies error

Open yoann-trouillet opened this issue 8 years ago • 3 comments
trafficstars

Hi ,

We are starting a new sailsjs project and we have been using sails-hook-jwt-auth (on our local) - . Everything worked perfectly!

I am now trying to deploy the sails app to an ubuntu instance in AWS. switched NODE_ENV to 'production' and started the app with node app.js

At this point the app doesn't start - I am getting the error below :

Unknown policy, "authtoken", referenced in config.policies. Are you sure that policy exists? It would be located at: /home/ubuntu/leadcaller.io/api/policies/authtoken.js

note : the small 't' in authtoken (instead of authToken).

Our policies.js looks like this :

module.exports.policies = { '': false, UserController : { '': ['authToken'] }, CampaignController : { '': ['authToken'] }, LeadController : { 'insert': true, 'process' : ['authToken'], 'show' : ['authToken'] }, AuthController : { '': true } };

Thanks for your time and any pointers you might have.

Cheers

yoann-trouillet avatar Aug 17 '17 23:08 yoann-trouillet

Hi, I'll look into this later today and get back to you.

robophil avatar Aug 18 '17 17:08 robophil

@Robophil Any update on this issue?

swaroopjayanthi9 avatar Oct 10 '17 09:10 swaroopjayanthi9

Sorry i couldn't reproduce. Can you share the entire content of policies.js

robophil avatar Oct 10 '17 09:10 robophil