Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
IdentityServiceCollectionUIExtensions.AddDefaultIdentity Method
Definition
- Namespace:
- Microsoft.Extensions.DependencyInjection
- Assembly:
- Microsoft.AspNetCore.Identity.UI.dll
- Package:
- Microsoft.AspNetCore.Identity.UI v10.0.0
- Package:
- Microsoft.AspNetCore.Identity.UI v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Identity.UI v2.1.0
- Package:
- Microsoft.AspNetCore.Identity.UI v2.2.0
- Package:
- Microsoft.AspNetCore.Identity.UI v3.0.3
- Package:
- Microsoft.AspNetCore.Identity.UI v3.1.18
- Package:
- Microsoft.AspNetCore.Identity.UI v5.0.9
- Package:
- Microsoft.AspNetCore.Identity.UI v6.0.6
- Package:
- Microsoft.AspNetCore.Identity.UI v7.0.5
- Package:
- Microsoft.AspNetCore.Identity.UI v8.0.19
- Package:
- Microsoft.AspNetCore.Identity.UI v9.0.8
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.
Overloads
| Name | Description |
|---|---|
| AddDefaultIdentity<TUser>(IServiceCollection) |
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies. |
| AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>) |
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies. |
AddDefaultIdentity<TUser>(IServiceCollection)
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies.
public static Microsoft.AspNetCore.Identity.IdentityBuilder AddDefaultIdentity<TUser>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TUser : class;
static member AddDefaultIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null)
<Extension()>
Public Function AddDefaultIdentity(Of TUser As Class) (services As IServiceCollection) As IdentityBuilder
Type Parameters
- TUser
Parameters
- services
- IServiceCollection
The IServiceCollection.
Returns
The IdentityBuilder.
Remarks
In order to use the default UI, the application must be using Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.StaticFiles and contain a _LoginPartial partial view that can be found by the application.
Applies to
AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>)
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies.
public static Microsoft.AspNetCore.Identity.IdentityBuilder AddDefaultIdentity<TUser>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Identity.IdentityOptions> configureOptions) where TUser : class;
static member AddDefaultIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Identity.IdentityOptions> -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null)
<Extension()>
Public Function AddDefaultIdentity(Of TUser As Class) (services As IServiceCollection, configureOptions As Action(Of IdentityOptions)) As IdentityBuilder
Type Parameters
- TUser
Parameters
- services
- IServiceCollection
The IServiceCollection.
- configureOptions
- Action<IdentityOptions>
Configures the IdentityOptions.
Returns
The IdentityBuilder.
Remarks
In order to use the default UI, the application must be using Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.StaticFiles and contain a _LoginPartial partial view that can be found by the application.
Applies to
Feedback
Was this page helpful?
