Click here to Skip to main content
15,886,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
when I login in my project locally all the cookies set on localhost but when I do it on server it doesn't set the cookies and I can see the token is received with redux-persist in localStorage.

here is the code of how I set it:

JavaScript
cookie.set("JWT", data.tokenAuth.token, {
        expires: epochToday(data.tokenAuth.payload.exp),
        secure: true,
        path: "",
      });
cookie.set("JWTRefreshToken", data.tokenAuth.refreshToken, {
        expires: epochToday(data.tokenAuth.refreshExpiresIn),
        secure: true,
        path: "",
      });


What I have tried:

I tried to use cookie but it was the same again.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900