0

I want to check if an httponly cookie(ex.accessToken) exists.

This is because I want to write logic based on the existence of cookies.

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49
Hyeongrok
  • 31
  • 1
  • 5
  • 1
    Send a request to your back end, and if it comes back with 401 you can assume you have a missing or expired access token. Also as a side note, be aware that storing an access token in a cookie may make you vulnerable to CSRF attacks unless you take additional precautions such as adding an anti-CSRF token. – Miguel Grinberg Jun 12 '22 at 16:28
  • Thanks to you I was able to solve it! – Hyeongrok Jun 18 '22 at 05:22

0 Answers0