How to disable automatic login second time passportjs sample

Hi There,

I think this is realted to passport and passport-auth0

I was managed to get the following example working but when you log out and log in again it logs in automatically.

I have seen lots of issues related to this but couldn’t find any that solved this problem. Is it possible to do this using the above example?

I don’t think it is a bug, but I can’t find any documentation to disable such activity.


Hey there @lukep!

I’m not experience with Node.js but can you check and try if that’s it to get rid of the cookies once logging out?

Make sure to hit v2/logout endpoint. When you redirect the user to the /v2/logout endpoint, Auth0 will clear the session server-side and redirect to the returnTo URL.

Here’s more on logout:

This thread also might be helpful as it touches the same issue:

Let me know down the road if you were able to solve the riddle!

thanks for fast response,

I tried the things in that article but it didn’t seem to make a difference
I will read the article on logout and see if it has more helpful info
As for the endpoints, I was assuming passport took care of that

I’m not fully aware how passport works and what it does under the hood that’s why I suggested such way to solve that as it is one of the common reasons people sometimes have issues with that.

Let me know down the road how it goes so I can potentially dig in if you require more help!