Angular 7 CORS Error

I am currently going through this demo.

I am doing the OIDC demo.

I am currently getting the following error: Access to XMLHttpRequest at ‘’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Any ideas on how to resolve?

Have you configured CORS in your authorization server? Go into API -> Authorization Server -> Trusted Origin tab -> Add Origin. Give it a name and put in http://localhost:4200 as origin URL.

1 Like

Thanks this was the issue. The problem was I did have access to API | Trusted Origin tab.