-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
appID not logging out #190
Comments
OK have done some more digging and found this article: From the article:
I've just had a look and I had resave: true in my code, so I have set it to false and it now appears that the user stays logged out. I just need to do some more testing to see that it doesn't affect the Cloudant storage. I have also had a look in the AppID sample apps and they all have resave:true so they may need to be adjusted (see here) |
@stepoibm A new version of the SDK has been released, v7, this includes revised samples of AppID working with passport v6. The samples include a revised logout method. Please also take note of the clearing of the |
I've tried everything to log out, but nothing has worked. My application was using: NodeJS 14.16 After updating to NodeJS 18.19, the problem started to occur (only with logging out). So, I tried updating the packages to: I also updated the code as written in the README, but nothing seems to work. The only way to log out is by clearing all the browser data. Here is my current logout code:
It appears that somehow the application session is being recreated during the redirections. |
I'm having the same issues as reported in #134
I've got my end points set up as documented in several places with a login, a check_auth to check for login, a logout, and a protected page. I also have been dumping req.session to the console before and after each action.
I can see the session contains the user credentials after login, when I check the login, and also before I call WebAppStrategy.logout(req).
After I call the above I can see the session details are cleared, so it appears the logout has worked, however if I hit the protected page or the check page, they are back again. If I call my logout once more I can again see the req.session[WebAppStrategy.AUTH_CONTEXT] before the call to WebAppStrategy.logout(req), and again it's cleared afterwards, but it just keeps coming back.
I am using Cloudant to implement a session store via the connect-cloudant-store package - could it be related to that??
EDIT: seems like others have had this problem with other passport related strategies and have found that they needed req.session.destroy() instead of or in addition to req.logout(). I see in the WebAppStrategy.logout code there's only req.logout()
The text was updated successfully, but these errors were encountered: