Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

CookieAuthenticationHandler, in case using SessionStore, cookieOptions.Expire is not set on renewal #973

@JaapMosselman

Description

@JaapMosselman

I think I found an issue in Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler class, method FinishResponseAsync. There is a line of where cookieOptions.Expire property is set if IsPersistent is true. The problem is that, in case of using a SessionStore, ticket.Properties.IsPersistent is always false, because in that case ticket is assigned a new instance with clean options.
So the cookie send to the browser is now a session cookie and when the browser is closed and reopened, the user must login again.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions