How IsPersistent works in OWIN Cookie authentication

前端 未结 3 1123
后悔当初
后悔当初 2020-12-04 19:08

It seems I don\'t understand clearly how IsPersistent in OWIN cookie authentication works, the code below is to use IsPersistent:

v         


        
3条回答
  •  生来不讨喜
    2020-12-04 19:59

    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.

提交回复
热议问题