Open jeanrinvil opened 2 years ago
Had the same issue. For me the problem was with setting up headers.
So instead of this:
const response = await fetch(`${wpRestApi}/jwt-auth/v1/token/validate`, {
headers: {
'Authorization': `Bearer ${token}`,
},
method: "POST",
});
Did this:
const headers = new Headers({
'Authorization': `Bearer ${token}`,
});
const response = await fetch(`${wpRestApi}/jwt-auth/v1/token/validate`, {
headers,
method: "POST",
});
I'm using your plugin with my ionic app
When I use the /jwt-auth/v1/token/validate , I got a cors problem However, /jwt-auth/v1/token/ seems to work well
I already put this on my htaccess :
and enable cors in my wp-config :
What I need to check ?