stevermeister/ngx-cookie-service

Expires in session not working in angular 9

Closed this issue · 1 comments

I was trying to set the expiry date when logging in.
I tried-

if(rememberMe === true)this.cookieService.set("token", JSON.stringify(token), 10);
else this.cookieService.set("token", JSON.stringify(token));

I also tried-

if(rememberMe === true)this.cookieService.set("token", JSON.stringify(token), 10);
else this.cookieService.set("token", JSON.stringify(token), 0);

expires in session was displayed in the browser cookies option but If I close the tab and reopen the web URL, I still can render to the homepage instead of the login page. I can even render it to the homepage when I close the browser and reopen it and I can see expires in session after reopen, too.

It actually an issue of Chrome. it works as expected in other browsers.