You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a node/express webapp with session setup. I use connect-mongo to store the sessions in mongodb, in a collection called 'sessions'. Hitting any rest endpoints on node/express seems to create/update an entry in the sessions collection.
Two questions:
I only enforce the local strategy on the /login endpoint. Why does a session get created every time an endpoint is hit? If the user isn't logged in, why does a session need to be created?
I implemented a new 'bearer' strategy. Configured it so session=false. passport.authenticate('bearer', { session: false }, function(err, user, info)
This still creates a session in the mongodb. Why is that?
The text was updated successfully, but these errors were encountered:
@simonbs we got around this issue by adding a piece of middleware in express before the session stuff which checks if user is logged in or about to log in, if not, don't do all this session business.
I have a node/express webapp with session setup. I use connect-mongo to store the sessions in mongodb, in a collection called 'sessions'. Hitting any rest endpoints on node/express seems to create/update an entry in the sessions collection.
Two questions:
This still creates a session in the mongodb. Why is that?
The text was updated successfully, but these errors were encountered: