cancel
Showing results for 
Search instead for 
Did you mean: 

Angular/Ionic access to Magento 2 REST API

Re: Angular/Ionic access to Magento 2 REST API

Hi,

I had the same problem, you must config the proxy on ionic json file to allow works from web browser, for android or iphone devices that problem CORS doesn't happens

 

Hope this help. 


Regards,

 

Marlon Olaya

Re: Angular/Ionic access to Magento 2 REST API

Hi all,

I'm developing an application ionic for a magento 2 website & get same issue when run app on website by command : ionic serve.
I fixed it by fixing htaccess file and it works fine.
But seem that this problem will not happen after build to real app on device.

By the way Now I'm using Token-based authentication to use web service.
I get an access token at first login and save it in my app for next time.
It's working fine.

http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html
But if unfortunately hacker or anyone has that token,he can do anything with customer's account.
So how can I get more security for it ?
Or do you have any better solution for it ?
Thank you so much !