Skip to content

Instantly share code, notes, and snippets.

@christianstrang
Created July 9, 2019 07:51
Show Gist options
  • Save christianstrang/eb097c6376aa20bbda3cf2c8c1c8fdde to your computer and use it in GitHub Desktop.
Save christianstrang/eb097c6376aa20bbda3cf2c8c1c8fdde to your computer and use it in GitHub Desktop.
SailsJS Passport Middleware Stack
module.exports.http = {
middleware: {
passportInit: require('passport').initialize(),
passportSession: require('passport').session(),
order: [
'cookieParser',
'session',
'passportInit',
'passportSession',
'bodyParser',
'compress',
'poweredBy',
'router',
'www',
'favicon',
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment