I’m trying to create a little mobile app with ionic and a wordpress (and JSON API) for backend.
I choose cookie auth for log people. This méthode work perfectly in my web browser thanks but when I use “phonegap serve” or apk directly on my phone nothing happen.
According to following lines $cookies.put(…) seems not working on my Android device.
console.log("Cookie: ");
$cookies.put(data['cookie_name'],data['cookie']);
console.log($cookies.getAll());
Have you some idea to resolve my problem ?
Thank you
You can’t use cookies, you should use localStorage.
To set the localstorage:
To retrieve localstorage:
To remove particular localstorage:
To clear all localstorage:
For your reference, you can use this link.
I am sure, this will help you.