CookieAuthenticationOptions, ExpireTimeSpan does not work

前端 未结 2 1480
深忆病人
深忆病人 2021-02-07 01:02

I have the following code:

    public void ConfigureAuth(IAppBuilder app)
    {
        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            


        
2条回答
  •  心在旅途
    2021-02-07 01:34

    It does expire.

    Make sure you do not have any background ajax activity as it extends the session (SlidingExpiration is true by default).

    Also I had to manually delete the old cookie after I changed ExpireTimeSpan from the default 14 days to a smaller value.

提交回复
热议问题