For our front-end application, we are using authentication with session cookie. When user needs to be authenticated he is redirected to log-in page, after that he is redirected to application. The session cookie is set. The ugly part is that we don't have any control over authentication server, and from what I am seeing, with each request from client, the value in the cookie is updated.
The problem is, when the user wants to log-out, we are just removing session cookie. This approach is working great in all browsers except Firefox.
For some reason, Firefox can't remove or update the cookie. When we try to do that, Firefox immediately creates new one with valid value.
For now we tried several things:
- Trying to remove the cookie.
- Updating the cookie (expiration, name and etc).
We tried the following code:
$.removeCookie('cookie_key');
$.cookie('cookie_key', null);
document.cookie = '';
Any ideas where the problem might be?