If you’re going to use JWT, be sure to send it to the client only with HttpOnly option enabled for the cookie via HTTPS connection.
Hello thank you for the response. I was thinking of that one before but I didnt implement it since i dont send my cookies to my server. so what I did is I have a interceptor using axios then before the request i have to attached a auth header like:
axios.cofig.header.authorization = `Bearer ${cookie('cookie-name')}`
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you’re going to use JWT, be sure to send it to the client only with HttpOnly option enabled for the cookie via HTTPS connection.
Hello thank you for the response. I was thinking of that one before but I didnt implement it since i dont send my cookies to my server. so what I did is I have a interceptor using axios then before the request i have to attached a auth header like: