Any opinions on this article? <https://www.rdegge...
# prisma-whats-new
e
i
It’s a balance. I do cookie storage for pretty much everything on web apps but local storage does have a place
e
yeah, it seems that secure cookies are much better. I have not gone through coding them yet.
i
Very easy to implement
e
ok good
i
I think someone wrote a small lib to make it even easier, too.
react-cookie
or
react-cookies
, I believe
e
yeah I took a quick look at react-cookie
h
if you're using cookies then make them http only and don't use them from js
e
yes, I've read about that. I just don't have my head fully around how to implement this.
i
e
ok, cool thanks. 🙂
h
like if you use them from js you can also just use localstorage
i
I agree with @harmony though. Server side implementation is a much safer and better way. I shared those articles more for context 😄
e
yeah, my understanding is that it has to come from the server.
So I assume that the react-cookie does not do that
i
I’m not sure. I’ve never used it or read any docs on it
e
ok
l
With the advent of CSP, this debate really is moot. Spend several hours learning it and build solid content security policy... Then let the browsers handle XSS. If I'm worried about third party JS being hacked, then I either have the wrong partners or I should self host the file.
h
imo you should always self host
👍 1