secure-session-vault-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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/sessionStorage vulnerabilities.
  • 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:latest

Or 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.

Package Sidebar

Install

npm i secure-session-vault-client

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

11.9 kB

Total Files

9

Last publish

Collaborators

  • ethernmyth
  • ethernmyth-pro