You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider including a CSRF token on sensitive forms if there's a chance the site could have an XSS vulnerability (typically from displaying user-submitted content)
Prefer using a cookie over localStorage for the auth token. Cookie too big? Split it. (remember cookies are automatically sent with each request, so consider using localStorage for non-sensitive info, or using separate domains for static resources like images).
My summary in a tweet
Cookie best practices
secure
attribute.samesite
to strict.__Host
so it's tied to a specific host.Cookie practices if HTTP only cookie isn't possible for some reason
Can set an
httponly
cookie via an AJAX call, but haven't seen this approach recommended by trusted parties for some reason. So, instead, can do below.The text was updated successfully, but these errors were encountered: