IdentityCookieAuthenticationBuilderExtensions.AddIdentityCookies Method

Definition

Overloads

AddIdentityCookies(AuthenticationBuilder)

Adds cookie authentication.

AddIdentityCookies(AuthenticationBuilder, Action<IdentityCookiesBuilder>)

Adds the cookie authentication needed for sign in manager.

AddIdentityCookies(AuthenticationBuilder)

Source:
IdentityCookiesBuilderExtensions.cs
Source:
IdentityCookiesBuilderExtensions.cs
Source:
IdentityCookiesBuilderExtensions.cs

Adds cookie authentication.

C#
public static Microsoft.AspNetCore.Identity.IdentityCookiesBuilder AddIdentityCookies (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder);

Parameters

builder
AuthenticationBuilder

The current AuthenticationBuilder instance.

Returns

The IdentityCookiesBuilder which can be used to configure the identity cookies.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AddIdentityCookies(AuthenticationBuilder, Action<IdentityCookiesBuilder>)

Source:
IdentityCookiesBuilderExtensions.cs
Source:
IdentityCookiesBuilderExtensions.cs
Source:
IdentityCookiesBuilderExtensions.cs

Adds the cookie authentication needed for sign in manager.

C#
public static Microsoft.AspNetCore.Identity.IdentityCookiesBuilder AddIdentityCookies (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.AspNetCore.Identity.IdentityCookiesBuilder> configureCookies);

Parameters

builder
AuthenticationBuilder

The current AuthenticationBuilder instance.

configureCookies
Action<IdentityCookiesBuilder>

Action used to configure the cookies.

Returns

The IdentityCookiesBuilder which can be used to configure the identity cookies.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0