Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

passport.initialize() middleware not in use

its because you have declared the middleware after you have intialised the routes 
in the index file
the correct order is
app.use(passport.initialize());
app.use(passport.session());
app.use(passport.setAuthenticatedUser);


app.use('/', require('./routes'));
 
PREVIOUS NEXT
Tagged: #middleware
ADD COMMENT
Topic
Name
8+7 =