Angular-oauth2-oidc: CORS issue to IdentityServer4

Created on 25 Aug 2017  路  8Comments  路  Source: manfredsteyer/angular-oauth2-oidc

Hello,

I setup the IdentityServer4 correctly because I have it works with Aurelia application.

XMLHttpRequest cannot load https://xxxxxxx(identityserver)/.well-known/openid-configuration. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.

Most helpful comment

@CallumBrankin Cors has to set before UseIdentityServer()

app.UseCors(options =>
{

        });

        app.UseIdentity();
        app.UseIdentityServer();

Hope it helps.

All 8 comments

never mind, I figured it out. On my IdentityServer, I have to set app.UseCors before app.UseIdenityServer

Thanks for this info.

@pnguyen535 I'm having the same problem, what did you do to solve this?

You can configure it on server side. You have to switch on CORS.

@CallumBrankin Cors has to set before UseIdentityServer()

app.UseCors(options =>
{

        });

        app.UseIdentity();
        app.UseIdentityServer();

Hope it helps.

Thank you @pnguyen535. It works!

glad it works for you

never mind, I figured it out. On my IdentityServer, I have to set app.UseCors before app.UseIdenityServer

You are the best of the best!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

godhar picture godhar  路  3Comments

zulander1 picture zulander1  路  4Comments

rbkrabbe picture rbkrabbe  路  4Comments

PandaaAgency picture PandaaAgency  路  3Comments

PaulienVa picture PaulienVa  路  4Comments