secure-session-vault-client
v1.0.1
Published
A secure client-side vault for storing session data outside of localStorage or sessionStorage
Readme
SecureSessionVault Client
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.
🔐 Features
- Stores session tokens securely via a local vault microservice.
- Avoids
localStorage/sessionStoragevulnerabilities. - ESM compatible, reusable NPM package.
- Auto-discovers Docker-hosted vault via default hostnames or manual URL injection.
🚀 Installation
npm install secure-session-vault-client🛠️ Usage
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");⚙️ Vault Backend
Run the backend using Docker:
docker run -p 17000:17000 ethernmyth/secure-session-vault:latestOr include it in your Docker Compose setup with:
services:
vault:
image: ethernmyth/secure-session-vault:latest
ports:
- "17000:17000"🌐 Default Fallback URLs
The client will try the following in order:
http://localhost:17000
http://127.0.0.1:17000
http://host.docker.internal:17000
You can override with:
new SecureSessionVault("http://custom-ip-or-host:17000");👤 Author
Created and Maintained by: Ethern-Myth
Give a like to this project and let's share it and spread it more. Thanks.
