CORS issue in OKTA keys call "oauth2/default/v1/keys"


#1

I am getting CORS error when i try to log in through OKTA in my application. All was working fine but today suddenly it stopped working.

Access to XMLHttpRequest at ‘https://dev-904995.oktapreview.com/oauth2/default/v1/keys’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

can anyone please guide me how to fix this? as i am using okta 1.0.3 version.


#2

Same as [ANGULAR] CORS Policies & SignIn Widget ISSUE
and Api /oauth2/default/v1/keys causing CORS authentication error

Please participate in one of these topic to maximize the chance to be solve.

Thanks, :smile:


#3

Okta Preview release:

OKTA-156155

Requests to the same Okta Org Authorization Server’s keys endpoint failed if the requests originated from different domains in the same browser.


#4

Its very annoying. hoping to get some solution soon.


#5

can you please elaborate it a bit? as my application was working fine 2 3 hours ago.


#6

This should be fixed now. Can you please confirm? See https://trust.okta.com/#incident/a9C1Y000000GpJuUAK for more information about this incident.


#7

Thanks mraible. but can you please tell us a workaround to tackle such thing in future as it wasted lot of time.


#8

Soon, you’ll be able to create developer accounts on production cells rather than our preview one. That should help.