Hacker News new | past | comments | ask | show | jobs | submit login

Out of curiosity, why is an AJAX post of JSON with credentials embedded bad practice?



Not bad practice from a security perspective per se, just annoying to users that don't want JS, or like the non-password fields to support their browser's features like autocomplete, etc. Granted if it's a SPA, some of that usability shop has sailed. And while any AJAX post is secure normally, many JS implemented login solutions open themselves up to CSRF and other problems.


You can have the form submit to a real address when js is disabled, and disable the form's behavior when js is enabled.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: