river-of-ebooks/api/hooks/passport/index.js

16 lines
308 B
JavaScript

let passportHook = sails.hooks.passport
if (!passportHook) {
passportHook = function (sails) {
return {
initialize: async function (cb) {
const helper = await sails.helpers.passport()
helper.loadStrategies()
return cb()
}
}
}
}
module.exports = passportHook