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

warn: Action middleware (POLICY: passport) was bound to a target `auth/*` that doesn't match any registered actions. #169

Open fyarepo opened 5 years ago

fyarepo commented 5 years ago

Hi, Created brand new sails project and sails-auth-new --s and sails lift. The warning messages are below. What can we do? Regards gab

====================================== debug: marlinspike (auth): loading Models... debug: marlinspike (auth): loading Controllers... debug: marlinspike (auth): loading Policies... warn: Action middleware (POLICY: passport) was bound to a target auth/* that doesn't match any registered actions.

warn: Ignored attempt to bind route (/register) to unknown action :: { controller: 'UserController', action: 'create', skipAssets: true } warn: Ignored attempt to bind route (/logout) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'logout' } warn: Ignored attempt to bind route (/auth/local) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' } warn: Ignored attempt to bind route (/auth/local/:action) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' } warn: Ignored attempt to bind route (/auth/:provider) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' } warn: Ignored attempt to bind route (/auth/:provider) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'provider' } warn: Ignored attempt to bind route (/auth/:provider/callback) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' } warn: Ignored attempt to bind route (/auth/:provider/:action) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' } warn: Ignored attempt to bind route (/auth/:provider/:action) to unknown action :: { controller: 'AuthController', skipAssets: true, action: 'callback' }

alexmndzdev commented 1 year ago

Any solution?

arunkamboj commented 1 year ago

You need to generate the controller again. Just rename your existing controller with another name and register the controller again using below command.

sails generate controller ControllerName

Example sails generate controller User it will create UserContoller.js

Thanks and Regards Arun Kamboj