paint-brush
Avoid XSS and CSRF Attacks in JWT (React + Golang): A Tutorialby@nitoge
3,987 reads
3,987 reads

Avoid XSS and CSRF Attacks in JWT (React + Golang): A Tutorial

by lengzuo8mMarch 20th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

There is 2 way to store JWT in frontend: a. Store it in localStorage b. Store it in Cookie For (a.), It is CSRF safe but is vulnerable to XSS. While (b.) It is XSS safe but is vulnerable for CSRF.

Company Mentioned

Mention Thumbnail
featured image - Avoid XSS and CSRF Attacks in JWT (React + Golang): A Tutorial
lengzuo HackerNoon profile picture
lengzuo

lengzuo

@nitoge

Stop talking

About @nitoge
LEARN MORE ABOUT @NITOGE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

lengzuo HackerNoon profile picture
lengzuo@nitoge
Stop talking

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite