Click below to verify your email with 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;
User returns with #signonix=TICKET&static_id=USER_ID in the URL hash.
// 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
// 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
// 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" }