This is just for test, please ignore. So the solution is simple, just install Microsoft.IdentityModel.Protocols.OpenIdConnect corresponding to the version of Microsoft.AspNetCore.Authentication.OpenIdConnect that you installed and the issue is solved without adding any new line of code.