Hi,
how exactly should the "Remember Me" checkbox on the login page work?
Currently I use a cookie so ticking or unticking the checkbox makes no difference. If the user does not explicitly logout, the next time they open their browser they are automatically logged in. This is not what I want.
Thanks
2 Answer(s)
-
0
ABP (and ASP.NET Zero) uses Microsoft.AspNetCore.Http.Authentication's AuthenticationManager.SignInAsync method and AuthenticationProperties.IsPersistent property.
See this explanation on Stack Overflow:
Persistent cookies will be saved as files in the browser folders until they either expire or manually deleted. This will cause the cookie to persist even if you close the browser.
If IsPersistent is set to false, the browser will acquire session cookie which gets cleared when the browser is closed.
Now the reason session cookie wont clear after restarting the browser is because of chrome default settings. To fix it go to chrome settings -> advanced, and uncheck Continue running background apps when Google Chrome is closed under System section.
-
0
Hi Aaron, that was exactly the information I was looking for! Thank you.