Angular-oauth2-oidc: Invalid issuer in discovery document expected: https://sub.domain.tld current: http://sub.domain.tld

Created on 4 Sep 2018  Â·  2Comments  Â·  Source: manfredsteyer/angular-oauth2-oidc

Hello,

I'm scratching my head for few days now because of this error :

invalid issuer in discovery document – "expected: https://sub.domain.tld" – "current: http://sub.domain.tld"

  • Front is running on http://localhost:4200
  • .NET Core identity backend running on remote server reverse proxied through nginx/1.10.3 with proper CORS support.

The worst part is on my local dev machine all requests sent by Angular's app on https://sub.domain.tld/.well-known/openid-configuration are successful with a HTTP 200 code.

I don't understand what I'm doing wrong.

Any help would really be appreciated !
Cheers,

Most helpful comment

Yes that was precisely the issue. I resolved my problem ! Fyi, I'm using IdentityServer4 as my Identity Provider, the issue was to add the option 'options.PublicOrigin = “https://sub.domain.tld“;' to change the default routes in /.well-known/openid-configuration which are 'http' and not 'https' because the .NET app is reverse-proxied.

All 2 comments

Did you spot the https (on "expected") vs http (on "current")?

Yes that was precisely the issue. I resolved my problem ! Fyi, I'm using IdentityServer4 as my Identity Provider, the issue was to add the option 'options.PublicOrigin = “https://sub.domain.tld“;' to change the default routes in /.well-known/openid-configuration which are 'http' and not 'https' because the .NET app is reverse-proxied.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zulander1 picture zulander1  Â·  4Comments

PaulienVa picture PaulienVa  Â·  4Comments

jeroenheijmans picture jeroenheijmans  Â·  4Comments

godhar picture godhar  Â·  3Comments

Swissbite picture Swissbite  Â·  4Comments