Unable to get JSON from fetch on external URL using Lock

Hey there, the situation is this:

I want to call an external URL, here localhost while developing (“http://localhost:3000/api/user/jobgroups”) and get back the json from the website output.

Code for call:

  .then(response => response.json())
  .then(data => console.log(data));

I do this in the lock.on(“signup ready”, function(authResult) {…}

Result should look like this (Websites output on calling the URL):

The Error I get is:

Access to fetch at ‘http://localhost:3000/api/user/jobgroups’ from origin has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

After this i added {mode: ‘no-cors’} to the fetch option and got the same result

I also added http://localhost:3000 to Allowed Web Origins and Allowed Origins (CORS) at
Dashboard > Applications > Applications and selected my application and clicked Advanced Settings

Anyone had this problem or can help?