Hi! I have a problem, I am trying to login from my React-Native App (running on my phone) and I always get error 400. I already built this app in Next.js and I know my strapi it’s fine, but something with my React-Native code doesn’t work.
I have something like:
// front-end
_signIn = () => {
const {identifier, password} = this.state;
const user = {identifier: identifier, password: password};
signIn(user).then(res => {
console.log(res);
});
};
// action
export const signIn = user => {
return new Promise(resolve => {
return axios(calls.signIn(user))
.then(res => {
resolve(res);
})
.catch(err => console.log(err));
});
};
// calls
signIn: user => ({
url: `${API_URL}/auth/local`,
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: user,
}),
I really need help to understand why the heck it’s not working, I replaced the APP_URL with http://‘my-ip’:1337