
useEffect(() => {
const fetchData = async () => {
try {
const userToken =JSON.parse( localStorage.getItem("cookieFallback"));
const token=userToken[a_session_${process.env.REACT_APP_PROJECT_ID}
]
console.log(token)
const config = {
headers: {
Authorization: Bearer ${token}
}
};
const response = await axios.post('http://localhost:3001/dashborddata/',null,config);
console.log(response.data);
} catch (error) {
console.log(error.message);
}
};
fetchData();
}, []);
Recommended threads
- Multiple Set-Cookie headers collapsed on...
I’m deploying a Next.js 15 app to Appwrite → Deploy → Sites. In app/api/auth/login/route.ts I try to set 3 cookies. Variant A (manual headers): const headers ...
- can't send emails
i explored the docs and it says Messaging.CreateEmail() but this function does not exist , i installed appwrite on next js env everything works fine except thi...
- Messaging via Resend: "to": "\"undisclos...
I'm using the node-appwrite@18.0.0 SDK. ``` await messaging.createEmail({ messageId: ID.unique(), subject: "Subject", content: `htmlCont...
