Replace costly, interceptable SMS OTPs with cryptographically signed, phone-number-free identity assertions. Assertions are Ed25519-signed, short-lived, scoped to what you asked for, and carry a per-service subject id so users cannot be correlated across services.
// 1. Server-side: open a request (never expose your API key to the browser)
const r = await fetch('https://api.sona.network/v1/verify/request', {
method: 'POST',
headers: { 'content-type': 'application/json', 'x-api-key': process.env.SONA_API_KEY },
body: JSON.stringify({ scope: ['tier', 'country'] }),
});
const { requestId, deepLink } = await r.json(); // show deepLink / QR to the user
// 2. Poll until the user approves on their Sona device
const res = await (await fetch(`https://api.sona.network/v1/verify/result/${requestId}`, {
headers: { 'x-api-key': process.env.SONA_API_KEY },
})).json(); // { status: 'APPROVED', assertion: '<jws>' }
// 3. Verify the EdDSA signature against the published keys
const jwks = await (await fetch('https://api.sona.network/.well-known/sona-keys')).json();
// check header.kid, signature, aud === your relyingPartyId, exp > nowThis calls the real API with a demo relying-party key held by this site's server. Open the approval link in a Sona session (the web client or the mobile app) to approve.
Relying party opens a verification request scoped to required attributes.
Relying party retrieves the cryptographically signed assertion bundle.
User device approves; the request must be signed by the device key. Scopes: tier, country, device_bound, kyc.
Public issuer Ed25519 keys for offline signature verification.