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
app.UseAbpOpenIddictValidation();
In the MyApplicationMenuContributor.cs under Menus folder, replace the using and menu name under
ConfigureMainMenuAsync
:with
Blazor Project (Tiered Solution)
In the MyApplicationWebModule.cs update the
AddAbpOpenIdConnect
configurations:Replace role scope with roles.
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:
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 the MyApplicationIdentityServerModule.cs replace ForwardIdentityAuthenticationForBearer under
ConfigureServices
method:with
In the MyApplicationIdentityServerModule.cs, remove IdentityServerOptions configuration and JwtBearer options under
ConfigureServices
method:In the MyApplicationIdentityServerModule.cs
OnApplicationInitialization
method, replace the midware:with
To use the new AuthServer page, replace Index.cshtml.cs with AuthServer Index.cshtml.cs and Index.cshtml file with AuthServer Index.cshtml.
Note: It can be found under the Pages folder.