OpenIddict Angular UI Migration Guide
Angular Project
In
environment.ts
andenvironment.prod.ts
add a trailing slash at the end of the issuer:
Http.Api.Host (Non-Separated IdentityServer)
In MyApplication.HttpApi.Host.csproj replace project references:
with
In the MyApplicationHttpApiHostModule.cs replace usings and module dependencies:
with
In the MyApplicationHttpApiHostModule.cs add
PreConfigureServices
like below with your application name as the audience:In the MyApplicationHttpApiHostModule.cs
ConfigureServices
method, replace the method call:From
ConfigureAuthentication(context, configuration);
toConfigureAuthentication(context);
and update the method as:In the MyApplicationHttpApiHostModule.cs
OnApplicationInitialization
method, replace the midware:with
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:
Http.Api.Host (Separated IdentityServer)
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 the 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
OnApplicationInitialization
method, remove the 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.