<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008MubclSABOkta Classic EngineSingle Sign-OnAnswered2024-04-15T09:30:27.000Z2020-04-26T06:06:57.000Z2020-04-29T13:09:40.000Z

IbrahimD.25475 (Customer) asked a question.

Cors exception - No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have implement the Reactjs login boilerplate and depoyed the app on aws (ec2). I'm receiving the following error during authentication:

 

Access to XMLHttpRequest at 'https://{domain}.okta.com/api/v1/authn' from origin '{myorigin}' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

{domain} and {myorigin} are placeholders because this is a public forum.

 

I have set {myorigin} as my redirect uri and have whitelisted it in API->Trusted Origins. 

 

 

I’ve done research online and see that many developers are also having this issue. Is there a solution yet ?

 

 


  • bc221 (bc221)

    I faced the same issue and after putting my origin url in API->Trusted Origins it worked for me. Make sure you select both CORS and Redirect.

     

    I could not help more unless I see error and value you put in Okta trusted Origin.

     

    Expand Post
This question is closed.
Loading
Cors exception - No 'Access-Control-Allow-Origin' header is present on the requested resource.