Cookies vs LocalStorage

For the past three days, I have been searching on the best method to store jwt token and the implementation code with restAPI or Graphql, but I can’t seem to find a clear answer, I don’t think LocalStorage is advisable, and cookies are vulnerable to CSRF. What’s your opinion

I don’t know enough about the topic yet to answer the question myself, but I found this article very helpful (and detailed):

The Ultimate Guide to handling JWTs on frontend clients (GraphQL)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.