
IbrahimD.25475 (Customer) asked a question.
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 ?

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.