0

I have a React JS client application and backend server based on node/express JS. I'm using JWT for authentication (Access and refresh token). Access token will be sent as part of Authorization header when making any API call.s I'm authenticating the user and that returns to the client access token & refresh token, access token is stored in state variable and refresh as a cookie. I did not have a problem, but when I made the cookie as HTTP only in node js server, I wasn't able to access the cookie anymore. I need the refresh token stored in my cookie to access refresh and get new access token. What would you suggest?

  • Does this answer your question? [How do I store JWT and send them with every request using react](https://stackoverflow.com/questions/39176237/how-do-i-store-jwt-and-send-them-with-every-request-using-react) – Jay Patel Sep 27 '21 at 03:38
  • Thanks for sharing, but no! In fact, I went ahead with my implementation after reading through that post. However the problem is using HTTP Only cookie. I'm using the API to refresh the token and send me back, but on even of page refresh I won't have any token to send to the API – ChivalrousRoot Sep 27 '21 at 08:36

0 Answers0