Search code examples
azuregoogle-chromeidentityserver4

IdentityServer MVC throws OpenIdConnectProtocolException when hosted in Azure


I used the AspNetIdentity Quickstart as a basis.It works fine locally, but when I host my IdentityServer in Azure and use it with the local MVC application I get all sorts of errors: enter image description here


Solution

  • I loaded my certificate from a local file, because I thought it was the least error prune solution until I got it up and running. Well guess who's wrong.

    It worked locally, but gave above errors when I logged in on Azure. Funny thing is, it didn't fail on startup, there even was a public key exposed at

    https://"MyIdentityServer".azurewebsites.net/.well-known/openid-configuration/jwks

    Solution: Use a more sophisticated approach, see:

    https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate-in-code