CookieTempDataProviderOptions.Cookie Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the settings used to create the cookie in CookieTempDataProvider.
public:
property Microsoft::AspNetCore::Http::CookieBuilder ^ Cookie { Microsoft::AspNetCore::Http::CookieBuilder ^ get(); void set(Microsoft::AspNetCore::Http::CookieBuilder ^ value); };
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get; set; }
member this.Cookie : Microsoft.AspNetCore.Http.CookieBuilder with get, set
Public Property Cookie As CookieBuilder
Property Value
Remarks
- SameSite defaults to Lax. Setting this to Strict may cause browsers to not send back the cookie to the server in an OAuth login flow.
- SecurePolicy defaults to SameAsRequest.
- HttpOnly defaults to
true
. - IsEssential defaults to
false
. This property is only considered when a user opts into the CookiePolicyMiddleware. If you are using the CookiePolicyMiddleware middleware together with CookieTempDataProvider, then either set this property totrue
or request user consent for non-essential cookies.