mirror of
https://github.com/strapi/strapi.git
synced 2025-07-15 13:02:42 +00:00
37 lines
471 B
JavaScript
37 lines
471 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Passport hook
|
|
*/
|
|
|
|
module.exports = function (strapi) {
|
|
const hook = {
|
|
|
|
/**
|
|
* Default options
|
|
*/
|
|
|
|
defaults: {
|
|
passport: {
|
|
strategies: {
|
|
local: {
|
|
strategy: 'passport-local'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
/**
|
|
* Initialize the hook
|
|
*/
|
|
|
|
initialize: function (cb) {
|
|
strapi.app.use(strapi.middlewares.passport.initialize());
|
|
|
|
cb();
|
|
}
|
|
};
|
|
|
|
return hook;
|
|
};
|