I’m getting the following error when trying to login to my Okta SPA app. I removed my okta domain for privacy.
Failed to load https://{myOktaDomain}.oktapreview.com/api/v1/authn: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8080’ is therefore not allowed access.
I’m using the sample angular code provided by Okta (https://github.com/okta/samples-js-angular/tree/master/custom-login)
I created a new app within Okta as shown below.
I assigned my account to the application.
I then went to Security > API > Trusted Origins and added a new origin.
Even though http://localhost:8080 is a trusted origin, I’m still getting CORS errors.