A secure client-side vault for storing session data outside of localStorage
or sessionStorage
. Designed to work with a self-hosted Dockerized backend that protects sensitive data from XSS and other client-side attacks.
- Stores session tokens securely via a local vault microservice.
- Avoids
localStorage
/sessionStorage
vulnerabilities. - ESM compatible, reusable NPM package.
- Auto-discovers Docker-hosted vault via default hostnames or manual URL injection.
npm install secure-session-vault-client
import { SecureSessionVault } from "secure-session-vault-client";
const vault = new SecureSessionVault(); // Or pass a custom vault URL
await vault.setItem("accessToken", "abc123");
const token = await vault.getItem("accessToken");
await vault.removeItem("accessToken");
Run the backend using Docker:
docker run -p 17000:17000 ethernmyth/secure-session-vault:latest
Or include it in your Docker Compose setup with:
services:
vault:
image: ethernmyth/secure-session-vault:latest
ports:
- "17000:17000"
The client will try the following in order:
http://host.docker.internal:17000
You can override with:
new SecureSessionVault("http://custom-ip-or-host:17000");
Created and Maintained by: Ethern-Myth
Give a like to this project and let's share it and spread it more. Thanks.