Signonix Integration

Click below to verify your email with Signonix:


How It Works

1. Redirect to Signonix

const signonixUrl = new URL('https://signonix.com/login.html');
signonixUrl.searchParams.set('client_id', 'YOUR_CLIENT_ID');
signonixUrl.searchParams.set('return_to', window.location.href);
window.location.href = signonixUrl;

2. Handle the Callback

User returns with #signonix=TICKET&static_id=USER_ID in the URL hash.

3a. Frontend-Only (No Backend)

// Read static_id directly from the hash — no fetch needed
const params = new URLSearchParams(location.hash.slice(1));
const userId = params.get('static_id');
// userId is your stable, consistent user identifier

3b. Verified (Optional Fetch)

// If you want proof the user actually verified, exchange the ticket:
const ticket = params.get('signonix');
const res = await fetch(
  `https://signonix.com/auth/verify-ticket?ticket=${ticket}&client_id=YOUR_CLIENT_ID`
);
const { ok, static_id } = await res.json();
// static_id matches the one from the hash

3c. With Backend (Get Email)

// On your server, with client secret:
POST https://signonix.com/auth/redeem
Authorization: Basic base64(client_id:client_secret)
{ "ticket": "..." }

// Response includes email:
{ "ok": true, "static_id": "sx_...", "email": "user@example.com" }