Security
Sessions
Manage session token encryption, cross-site scripting (XSS) protections, and session invalidation.
Overview
Asiyst stores ephemeral tokens in browser memory with strict defenses against Cross-Site Scripting (XSS) and Session Hijacking.
Storage Security & XSS Mitigation
- Session tokens are stored in
sessionStorageby default, scoped strictly to the current browser tab.
- The SDK sanitizes all incoming markdown text and code blocks using DOMPurify before injecting into the Shadow DOM, neutralizing XSS vectors.
Session Revocation on Logout
When a signed-in user logs out of your platform, call:
Asiyst.logout();
This invalidates the token on the server and purges all cached user traits from local browser storage.