You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wanting to make some changes to the way the local protocol works in particular the login but can't work it out. In my app api > services > protocols > local.js I would have assumed something like the following would have giving me the ability to override it but it doesn't do anything
var _ = require('lodash');
var _super = require('sails-permissions/api/services/protocols/local');
function protocols () { }
protocols.prototype = Object.create(_super);
_.extend(protocols.prototype, {
login: function (req, identifier, password, next) {
console.log(req);
}
});
module.exports = new protocols();
The text was updated successfully, but these errors were encountered:
I would also like to see this added. I've dug through the code now for a few hours and as far as I can tell there actually isn't a way to add any other passport strategies than the ones supported by the plugin. The "et al" in the docs is overstated.
The issue is that all passport strategies require a callback.
The options passed in must be an object. This means setting options: function(){} does not work in config.
The second argument passed to new strategies is the protocol
While you can define the protocol to use it seems impossible to change the services protocol at runtime before the strategy is instantiated but after the config is loaded.
I'm wanting to make some changes to the way the local protocol works in particular the login but can't work it out. In my app api > services > protocols > local.js I would have assumed something like the following would have giving me the ability to override it but it doesn't do anything
The text was updated successfully, but these errors were encountered: