gergelyke.github.io
gergelyke.github.io copied to clipboard
Building Secure JavaScript Applications
Hello, Under the "# How can I protect against CSRF?" section, the last line. You had "To learn more about XSS prevention, read the CSRF Prevention Cheat Sheet: https://www.owasp.org/index.php/CSRF_Prevention_Cheat_Sheet.". Should be "To learn more about CSRF"?
Thanks a lot @4y0 ! fixed :)
For a "Change password" type of form, is it safe to send that form data via ajax? It seems no matter what, the password can somehow be peeked at in the browser. Is this right? Or is there a safe way to transmit a new password back to the server with ajax?
Hi @pjsinco ! if the password is sent via HTTPS, you should be good
You recommend cookies to store JWTs, but how would that work in a SPA which is static and served on a CDN?
Hi. What is your opinion on storing access token and refresh token in local storage? Relatively frequent refresh of both tokens every 10 minutes. HTTPS of course.
100% agreed with this post on it: https://www.rdegges.com/2018/please-stop-using-local-storage/
But does this article take into consideration that my OAuth2 tokens (access and refresh) are refreshed quite often (for instance every minute without any notable overhead doing that)?