oualidmaz | Posts: 7

Call API from front-end (angular)

0 votes
Is it possible to consume your API directly from front-end ex. Angular ? When i tried last time , i got "No Access-Control-Allow-Origin" message. Thank's

Duo_Liang | Posts: 3776

Reply to: Call API from front-end (angular)

0 votes
Hi oualid, When invoking API calls from Javascript in a browser, it triggers and CORS and preflight requests. For currently, there's no direct way to adjust your code and enable call API from front-end, and all API calls should be requested from your server side. But many potential solutions have been proposed internally and there could be a way to do so in the future. I would update this thread once there's any updates on this. Hope this could help! Duo

oualidmaz | Posts: 7

Reply to: Call API from front-end (angular)

0 votes
Ok Thank's

AyshaSingh | Posts: 9

Reply to: Call API from front-end (angular)

0 votes

Hey Duo, 

Could you please confirm if there is any update on this issue? We are trying to call API directly from frontend and facing CORS issues.

Thanks!


Duo_Liang | Posts: 3776

Reply to:

0 votes

Hi Aysha,

 

Unfortunately, it's still not available to directly invoke API calls from the frontend. You will have to at least set up a backend service and proxy all requests to the OneSpan Sign server.

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off