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

Make Roles optional at the Microsoft.Extensions.Identity layer #1269

@HaoK

Description

@HaoK

High level idea is to enable something akin to:

Related to #651

I think this should be safe to do in 2.1, but we might want to consider doing something like this in RTM (as this is really finishing what we started in 651)

services.AddIdentityCore<TUser>() // UserManager related servives
   .AddRoles<TRole>() // RoleManager related services
   .AddEntityFrameworkStores<TContext>(storeOptions => { }) // All stores needed for all managers, optional schema tweaking
   .AddSignInManager() // SignInManager related stuff

Would be equivalent to today's (which we would still support):

services.AddIdentity<TUser, TRole>().AddEntityFrameworkStores<TContext>()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions