redux-react-session
redux-react-session copied to clipboard
delete session and delete user not working..
Has any one else experienced deleteSession() or deleteUser() not working?
Are there any working examples?
This is what I'm using but it doesn't affect any cookies, etc
sessionService.deleteSession();
sessionService.deleteUser();
Working for me. I'm using it like this:
sessionService.deleteSession().then(() => sessionService.deleteUser());
Not sure this way is necessary or better, though. This library is great but could definitely use better docs.
I'm seeing odd behavior as well. At logout, I call api to do server logout, delete session and user and then update store.
userService.logout()
.then(() => {
sessionService.deleteSession();
sessionService.deleteUser();
dispatch({ type: userConstants.LOGOUT });
After debugging, redux-react-session is telling me that the session is gone, but I still see it in IndexedDB. I'm using default storage, so session and user are stored in IndexedDB>redux-react-session>keyvaluepairs.
I'm worried that if those values aren't cleared that they'll somehow be reloaded. So technically, this works, but I'm afraid I'll get a bug later that will be hard to find. Also, from a debugging standpoint, it would be nice to look in developer tools and tell whether I have a session or not.
I just changed storage methods and now I'm seeing the behavior I expected.
From sessionService.initSessionService(store);
To sessionService.initSessionService(store, { driver: 'COOKIES' });
I am still experiencing this issue. When I reload my page GET_SESSION_SUCCESS gets called automatically