npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cryptologin-client

v1.2.5

Published

Zero-storage authentication client SDK for CryptoLogin

Readme

CryptoLogin Client SDK

npm version Tests License: MIT Bundle Size npm downloads

Zero-Storage Authentication Client SDK - The server knows absolutely nothing about your users.

Client-side JavaScript SDK for CryptoLogin - Zero-Knowledge-Inspired Passwordless Authentication.

The time is now ripe for it

Stop storing password hashes. With CryptoLogin, the server only stores encrypted challenges. The master secret is used once at registration, then forgotten. At login, no secret ever crosses the network.

CryptoLogin uses a challenge-response mechanism inspired by Zero-Knowledge principles. The server never stores your secret. Your secret never leaves your device.

🚀 Quick Start

´´´bash npm install cryptologin-client

import { createClient, deriveUserId } from "cryptologin-client";

// Initialize
const client = createClient({
  baseURL: "https://your-api.com/api/v1",
});

// Register
const userId = await deriveUserId("your-master-secret-min-32-chars.");
await client.register(userId);

// Login
const session = await client.login(userId, "your-master-secret-min-32-chars.");
console.log("Authenticated:", session.authenticated);

🔒 Security Model

| Feature | Traditional Auth | CryptoLogin | | ---------------------- | ------------------- | -------------------- | | Password storage | Hashed on server | Never stored | | Database breach impact | Credentials exposed | Nothing to steal | | "Forgot Password" | Email reset | Impossible by design | | User sovereignty | Low | Absolute |

CryptoLogin uses a Zero-Storage Authentication model:

  1. Client-side derivation: The user_id is derived from master_secret using PBKDF2-SHA512 (100,000 iterations)
  2. Challenge-Response: Server generates encrypted challenges using AES-256-GCM
  3. Local decryption: Client decrypts challenges locally - master_secret NEVER leaves the browser
  4. No server secrets: Server stores only encrypted tokens, not passwords or secrets

Cryptographic Standards

  • Key Derivation: PBKDF2-SHA512 (100,000 iterations)
  • Encryption: AES-256-GCM
  • Hashing: SHA-256

⚠️ Important Trade-offs

CryptoLogin is NOT for everyone:

  • ❌ No "Forgot Password" flow (server knows nothing)
  • ❌ If user loses master_secret, account is permanently locked
  • ✅ Absolute data sovereignty
  • ✅ Zero server-side secrets to steal
  • ✅ Immune to database breaches

This is a deliberate design choice, not a bug.

Features

  • 🔐 Passwordless Authentication - No email, no password required
  • 🛡️ Zero-Knowledge-Inspired - Your secret never leaves your browser
  • ⚡ Web Crypto API - Uses native browser cryptography
  • 📦 Lightweight - ~3KB minified
  • 🔧 TypeScript Support - Full type definitions included
  • 🌐 Universal - Works in browsers and Node.js

Installation

npm install cryptologin-client
# or
yarn add cryptologin-client
# or
pnpm add cryptologin-client

📖 API Documentation

API Reference

| Option | Type | Default | Description | | ------- | -------- | -------- | ------------------------ | | baseURL | string | Required | Your CryptoLogin API URL | | timeout | number | 10000 | Timeout in milliseconds | | onError | function | null | Error callback |


createClient(options)

Creates a new CryptoLogin client.

const client = createClient({
  baseURL: "https://api.example.com/v1", // Required
  timeout: 30000, // Optional, default: 30000ms
});

deriveUserId(masterSecret)

Derives a unique user ID from the master secret. Minimum 32 characters required.

const userId = await deriveUserId("my-super-secret-passphrase-1234567890");
// Returns: 64-character hex string

client.register(userId)

Registers a new user with the server.

const result = await client.register(userId);
// Returns: { success: true, userId: '...' }
});

client.login(userId, masterSecret)

Authenticates the user using challenge-response.

const session = await client.login(userId, masterSecret);
// Returns: { authenticated: true, sessionId: '...' }

client.logout()

Logs out the current user.

await client.logout();

Session Management

import { saveSession, loadSession, clearSession } from "cryptologin-client";

// Save session after login
saveSession(session);

// Load existing session
const session = loadSession();

// Clear session (logout)
clearSession();

🧪 Development & Testing

# Install dependencies
npm install

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Watch mode
npm test -- --watch

📦 Publishing

npm version patch  # or minor/major
npm publish

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.


📄 License

MIT © erabytse


Author

erabytse


🔗 Links

. Server SDK (Python): cryptologin on PyPI

. CryptoLogin GitHub

. Live Demo

. Website: cryptologin-website

. PyPI Package


Reinventing Authentication. One Secret at a Time.

A quiet rebellion against digital waste.