I am fairly new to Okta and their API/libraries, so please bear with me if I sound stupid.
I am trying to make a
GET request on
/api/v1/users/ for Get User from Login through my React app. I am using Axios to make the call. I have created an API Token in Okta and set up http://localhost:3000 as a Trusted Origin within the Okta Developer Admin console.
Every time I try to make the request, I am getting the following errors back:
GET https://email@example.com 403 (Forbidden) Failed to load https://firstname.lastname@example.org: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 403.
I can safely use the
okta-auth-js library to make authentication calls and that works perfectly. Any help on how I can solve this problem? I read somewhere that it might be because it can’t call this particular API on my front-end, and has to be done via a back-end service.