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

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

Open fyarepo opened this issue 7 years ago • 2 comments

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' }

fyarepo avatar Jul 16 '18 23:07 fyarepo

Any solution?

alexmndzdev avatar Aug 23 '22 16:08 alexmndzdev

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

arunkamboj avatar Sep 18 '22 08:09 arunkamboj