cookies-next icon indicating copy to clipboard operation
cookies-next copied to clipboard

Can't send a cookie from a browser

Open invinoverita opened this issue 9 months ago • 0 comments

here's my setCookie, that happens after authorization completed:

.addCase(authUser.fulfilled, (state, action) => { state.userAccessToken = action.payload.access_token; setCookie("m_token", action.payload.refresh_token, { httpOnly: true, secure: true, sameSite: "none", }); state.authStatus = RequestStatus.FULFILLED; })

after that i send a refresh request with cookies:

switch (authStatus) { case RequestStatus.FULFILLED: console.log(getCookies()); setIsError({ status: false, message: "" }); axios.get("http://mas.ksred.ru/api/v1/user/refresh-token", { headers: { "Content-Type": "application/json", Authorization: "Bearer", }, withCredentials: true }, ).catch((error) => { console.log(error) }) break;

but request does not send any cookies with himself: image

what can i do?

invinoverita avatar May 26 '24 16:05 invinoverita