OpenIddict Blazor-Server UI Migration Guide
Blazor Project (Non-Tiered Solution)
In the MyApplication.Blazor.csproj replace project references:
with
In the MyApplicationBlazorModule.cs replace usings and module dependencies:
with
In the MyApplicationBlazorModule.cs add
PreConfigureServices
like below with your application name as the audience:In the MyApplicationBlazorModule.cs
ConfigureServices
method, replace the method call:From
ConfigureAuthentication(context, configuration);
toConfigureAuthentication(context);
and update the method as:In the MyApplicationBlazorModule.cs
OnApplicationInitialization
method, replace the midware:with
Blazor Project (Tiered Solution)
In the MyApplicationWebModule.cs update the
AddAbpOpenIdConnect
configurations:Replace role scope with roles.
IdentityServer
This project is renamed to AuthServer after v6.0.0. You can also refactor and rename your project to AuthServer for easier updates in the future.
In MyApplication.IdentityServer.csproj replace project references:
with
In MyApplicationIdentityServerModule.cs replace usings and module dependencies:
with
In the MyApplicationIdentityServerModule.cs add
PreConfigureServices
like below with your application name as the audience:In MyApplicationIdentityServerModule.cs
OnApplicationInitialization
method remove IdentityServer midware:
Http.Api.Host
In the MyApplicationHttpApiHostModule.cs
OnApplicationInitialization
method, deletec.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
inapp.UseAbpSwaggerUI
options configurations which is no longer needed.In
appsettings.json
delete SwaggerClientSecret from the AuthServer section like below:
To use the new AuthServer page, replace Index.cshtml.cs with AuthServer Index.cshtml.cs and Index.cshtml file with AuthServer Index.cshtml and rename Ids2OpenId with your application namespace.
Note: It can be found under the Pages folder.