I have a request for authorization to the server:
axios
.post(
"http://localhost:5000/api/auth/sign-in",
{ ...values },
)
.then((res) => {
const { token } = res.data;
//there I need to save coookie with token that came from server
})
after successful authorization, the server sends the token, how can I save this token in the cookie with the httpOnly flag?