CORS Error when Calling the /.well-known/openid-configuration Endpoint
Last Updated:
Overview
This article discusses a potential cause for a CORS error in the browser when the browser makes a request to the /.well-known/openid-configuration endpoint.
Applies To
- /.well-known/openid-configuration Endpoint
- CORS
Cause
This is usually a side effect of some libraries adding custom headers to the requests. Even though any origin can access the endpoint, any non-standard headers in the request will trigger CORS errors.
Potentially, a third-party library is making the request, or some HTTP interceptors in the code add custom headers to HTTP requests.
Solution
Custom headers should not be added to this request. This can be avoided with a configuration in the library being used or by updating the code.