I have a problem with connecting to Okta from Angular http://localhost:4200 has been blocked by CORS policy:
I added it to the application URLs but I still have this problem, should I add it to trusted origin?
1 Like
Hi @michaelides CORS is very common error. Please note that as mentioned here : Overview | Okta Developer every website origin has to be mandatorily be permitted/added as a trusted origin first to pass through the CORS mechanism
1 Like
Thanks @monishb , where in the admin dashboard can I add as a trusted origin?
Hey @michaelides please find the steps here to add a trusted origin: Grant cross-origin access to websites | Okta Developer
To sum it up:
- Select Security and then API .
- Select the Trusted Origins tab.
- Select Add Origin and then enter a name for the organization origin.
- In the Origin URL box, specify the base URL of the website that you want to allow cross-origin requests from.
- Make sure that CORS is selected as the Type . You can also enable the Redirect setting, which allows for redirection to this Trusted Origin after a user signs in or out.
- Click Save .
Amazing. Thanks Monish.
1 Like
@Powlowski please what’s the relationship with MyCCPay ?
1 Like
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.