I'm having the following problem with the API fetch on android devices:
Here is the fetching code:
login(user,password) {
let query = oauthManager.loginUrl(user,password);
console.log(query);
return fetch(query)
.then(response => response.json())
.then(json => {
//Error
if( json.error ){
console.log(json.error);
return false
}
//Save and return token
return oauthManager
.saveOauth(json)
.then(() => {
return oauthManager.saveUser(user)
})
.then(() => {
return oauthManager.getToken()
})
.then(token => {
console.log(token);
return true
});
})
.catch((error) => {
console.log(error)
});
},
The scripts works fine on ios devices. Any ideas on why is this happening?
Thank you very much
