Open u-can-miracle opened 6 years ago
The only advantage of using a cookie is the one you've mentioned, because I am using localStorage I make sure that the jwt expires in a short period and I do not put sensitive data with the jwt
Another advantage to storing the JWT in a cookie is if you need server-side rendering with an auth context.
Hi. I send
jwt
by cookies with enabledhttpOnly
flag so user can't set them from browser. As I saw before you recomend uselocalStorage
for this case. but some one can stolejwt
fromlocalStorage
In my case I have ease access tojwt
from server and any access from browser as I see it's more secure. So, why you recommend to uselocalStorage
?