OpenIddict MVC/Razor UI Migration Guide
Web Project (Non-Tiered Solution)
In MyApplication.Web.csproj replace project references:
with
In MyApplicationWebModule.cs replace usings and module dependencies:
with
In MyApplicationWebModule.cs
ConfigureServices
method update authentication configuration:with
and update the
ConfigureAuthentication
private method to:- In the MyApplicationWebModule.cs add
PreConfigureServices
like below with your application name as the audience:
- In the MyApplicationWebModule.cs add
In MyApplicationWebModule.cs
OnApplicationInitialization
method replace IdentityServer and JwtToken midwares:with
Web Project (Tiered Solution)
In the MyApplicationWebModule.cs update the
AddAbpOpenIdConnect
configurations:
Replace role scope to roles and add UsePkce and SignoutScheme options.
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: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.
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: