If you have been following the IdentityServer Quickstarts whilst you are evaluating the framework, you can easily integrate AdminUI using the instructions below. Using the Quickstarts that build upon the ASP.NET Core Identity Visual Studio templates is not recommended for production scenarios, due to their fragility and abuse of anti-patterns.
AdminUI uses a custom ASP.NET Core Identity schema. This schema extends from the ASP.NET Core Identity Entity Framework defaults, meaning any registration, password reset or login functionality you might already have, will continue to work with the AdminUI user store.
However, any existing users will need to be exported to use the AdminUI schema. For more details, see the Migrating to the IdentityExpress Identity Schema section of this article.
This schema is available in the nuget package
IdentityExpress.Identity. Check out the Admin UI IdentityServer integration example for a working IdentityServer installation using this nuget package and schema.
Existing installations of IdentityServer need no changes, as long as IdentityServer and AdminUI are using the same database.
For migrating users to the AdminUI identity schema, we support the automatic migration of users from the ASP.NET Core Identity Entity Framework schema.
A migration will be attempted on first run of AdminUI if the following conditions are met:
- The database for
IdentityConnectionStringhas no users
- The configuration setting
IdentityDatabaseToMigrateConnectionStringare not equal
To use the IdentityExpress Identity schema used by AdminUI, you simply need to update your existing ASP.NET Identity registrations to look like the following:
// Register Identity using IdentityExpress entities and stores services.AddIdentity<IdentityExpressUser, IdentityExpressRole>() .AddUserStore<IdentityExpressUserStore>() .AddRoleStore<IdentityExpressRoleStore>() .AddIdentityExpressUserClaimsPrincipalFactory();
// Register the DbContext for the IdentityExpress schema services.AddDbContext<IdentityExpressDbContext>();
Or you can use our shortcut extension method:
Any existing registrations for
SignInManager's, or usages of
IdentityUser, should also be updated.