#Csrf-Protection
2 notas · última:
Today's rabbit hole: securing JWTs for authentication, httpOnly cookies, CSRF tokens, secrets & more
The post walks through storing JWTs in httpOnly cookies, protecting routes with a separate login flag, handling logout server-side, and adding CSRF protection with csurf, CORS, SameSite, and headers.
Phoenix CSRF protection in HTML forms, React forms, and APIs
Explains how Phoenix handles CSRF protection for HTML forms, how to send the token in React AJAX requests, and how to expose it as a cookie for SPA or API-style clients.
