user = Cookies.get("user")
I can't get access to this road. I used cookies to store user data including the token. Please I need Help
I think your using Strapi CMS and request method for authenticated roots must be POST not GET here the example :
const {data ,status} = await
axios.post('https://localhost:1337/posts',{
headers : {
Authorization: `Bearer ${token}`
}
});
if(status === 200){
setData(data)
}else{
console.log('eeror')
}
make sure to mark the find method from strapi admin otherwise you will get 403 error in strapi user has jwt not token so make sure the token is the jwt which come from strpai when user login!