Seeking help in the Error: Login sessions require session support. Did you forget to use `express-session` middleware?

I have been trying to fix this issue in the express-session middleware
by using this line of code inside the app.js file .

app.use(session({ }))

My code is not throwing any error when I run it on command prompt.

I am attaching a picture and updated link of complete code for reference.


image

@lasjorg Please have a look into this., Thanks

Try moving the app.use(session({someOptions})) up before you use app.use(passport.session())


I would suggest you look at the lib docs, read/watch some more tutorials, and look at some more example code. Create simple test projects that isolate the functionality you want to understand and use.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.