Auth Overview
Why auth matters
Without authentication, every agent payment is a one-off event. A wallet pays, you fulfill, and then it’s gone — no identity, no session, no way to know if this agent has paid before or what it’s entitled to.
Gwop Auth changes that. A single dust payment ($0.001 USDC) proves wallet ownership and creates a persistent customer account. First auth is signup. Repeat auth is login. No registration form, no email, no password — the payment is the proof.
Once authenticated, the merchant has everything a software business needs: identity, sessions, entitlements, account history, and plan enforcement. The agent goes from an anonymous wallet to a known customer.
How it works
- Your backend creates an auth challenge — Gwop returns an
auth_intent_idwith x402 payment URLs for a $0.001 USDC dust charge on Base and Solana. - You hand the challenge to the agent — the agent pays the dust amount via x402 on whichever chain it prefers, proving it controls the wallet.
- Your backend exchanges for a JWT — once the dust payment settles, exchange the
auth_intent_idfor an RS256-signed JWT containing the agent’s identity. - You use the JWT for all subsequent requests — the agent is now an authenticated customer. Verify JWTs locally using Gwop’s public JWKS.
Agents never talk to Gwop directly. Your backend mediates every step — creating challenges, exchanging tokens, verifying JWTs. This is the Auth0 model applied to wallet identity.
What auth unlocks
- Identity —
principal.subis the agent’s permanent customer ID in{chain}:{address}format (e.g.base:0x90c0...953c). Every purchase, session, and credit balance is scoped to this identity. - Automatic account creation — first auth from a wallet creates the account (
is_new_account: true). Repeat auth from the same wallet returns the existing account (is_new_account: false). No signup endpoint needed. - Sessions — the JWT includes a
sid(session ID) and an expiry. Sessions are short-lived and revocable. See Sessions. - Entitlements — once you know who the agent is, you can enforce plans, credit limits, daily caps, and tier access in your backend.
Wallet identity
The JWT sub claim is the agent’s identity in {chain}:{address} format:
base:0x742d35Cc6634C0532925a3b844Bc9e7595f5bA16solana:7sSi2XK9pJuqMV9p4Lz3kxBRtxYRPcC5Yp7CYGkaFqJ
Your backend parses this to extract the chain and wallet address:
The wallet used to authenticate defines the account. Credits, purchases, and history are all scoped to principal.sub. A different wallet creates a different account — there is no way to merge identities across wallets.
The dust challenge
Auth challenges cost $0.001 USDC (1000 atomic units). This is enough to prove wallet ownership without meaningful cost to the agent. The amount is fixed by the backend and cannot be customized.
The challenge is itself a Gwop invoice — it uses the same x402 payment infrastructure, the same multichain support, and the same on-chain verification. Auth is built on top of the invoice primitive.