Live Demo

Try the full login flow. On desktop: scan the QR with a separate mobile Verus wallet. On mobile (with the wallet installed on the same device): tap Sign in with Verus.

Event log
(waiting)

How It Works

1

User clicks Login

Your website presents a "Login with VerusID" button. No username or password fields needed.

2

Server creates challenge

Your backend calls the Verus daemon to generate a unique, time-limited cryptographic challenge linked to your VerusID.

3

User scans QR code

The challenge is encoded as a deep link and displayed as a QR code. The user scans it with Verus Mobile or clicks the link directly.

4

Wallet signs response

Verus Mobile signs the challenge with the user's private key and posts the signature back to your callback URL.

5

Server verifies on-chain

Your server verifies the signature against the blockchain. If the identity and signature are valid, the user is authenticated.

Add to Your Website

1. Install verus-connect

The verus-connect package provides a turnkey backend for VerusID authentication.

Terminal
npm install github:Fried333/verus-connect
npm install git+https://github.com/VerusCoin/verusid-ts-client.git

2. Configure environment

Create a .env file with your signing identity and callback URL.

.env
# The i-address of the VerusID that signs challenges
SIGNING_IADDRESS=iExampleAddress...

# WIF-encoded private key for the signing identity
PRIVATE_KEY=your-private-key

# Where the wallet posts the signed response
CALLBACK_URL=https://yoursite.com/verus/callback

3. Start the server

Run verus-connect as a standalone sidecar, or mount it as Express middleware.

Standalone
npx verus-connect start
Express Middleware
const express = require('express');
const { verusConnect } = require('verus-connect');

const app = express();

// Mount at /verus — provides /verus/login and /verus/result/:id
app.use('/verus', verusConnect({
  signingAddress: process.env.SIGNING_IADDRESS,
  privateKey:     process.env.PRIVATE_KEY,
  callbackUrl:    process.env.CALLBACK_URL,
}));

app.listen(3000);

4. Add the frontend

Drop in the <verus-connect-login> web component. It renders both surfaces (QR for desktop scan-with-phone, button for same-device wallet tap), handles the redirect-back flow automatically, and fires a verified event when the sign + sidecar verification complete. No bespoke fetch or polling.

Frontend (HTML + JS)
<!-- Single bundle, ~30 KB. QR encoder is inlined — no CDN deps. -->
<script src="https://your-cdn.example/dist/web.global.js?v=5.2.4"></script>

<verus-connect-login base="/verus"></verus-connect-login>

<script>
const el = document.querySelector("verus-connect-login");

// e.detail = { iAddress, friendlyName, systemId, chainName, evidence }
el.addEventListener("verified", async e => {
  await fetch("/auth/session", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(e.detail),
  });
});

el.addEventListener("error",   e => console.error("login error:", e.detail));
el.addEventListener("expired", () => console.log("challenge expired"));
</script>

Security

VerusID authentication is built on public-key cryptography verified directly on the Verus blockchain. There are no shared secrets, no tokens to steal, and no central authority to compromise.