Blocked by CORS React js in (custom domain)

I’ve added my localhost in trusted origin source for CORS and redirect both, and it is working fine for my dev-okta.com domain url when i try to sign in my React js app by providing dev-okta.com issuer.
But when i try to login after configuring custom domain and direct to my custom domain for oauth2 authentication by changing to the new issuer i.e. my custom domain one by changing config of javascript, it is throwing CORS blocked error. I’ve already configured my custom domain in my identity provider, authorization server and on my SPA sign on page by changing the issuer to my custom domain in okta. That custom domain is pointing to this dev-okta.com domain and i’ve checked that by running “dig” and “nslookup” on my custom domain, they both contains my dev-okta.com domain in result so there’s no issue here.
What am i missing here to allow CORS to direct from my javascript app to my custom domain okta login page aswell.

What endpoint are you seeing the CORS error with?

https://ssologin.(mydomain).com/oauth2/default is the new issuer and '/oauth2/default ’ is the endpoint.

Add the custom domain in the trusted origin CORS source

1 Like