Wallet Auth
Normalize Gwop auth into app-owned primitives
Keep the Gwop auth lifecycle in a thin adapter instead of calling the SDK directly from routes. That keeps your API surface app-shaped while still making the upstream flow obvious.
The lifecycle
- Create the auth intent.
- Hand the returned payment URLs to the agent.
- Exchange the settled intent for a bearer token.
- Use
sidfor live session lookup or revocation.
Create an auth challenge
Each returned paymentUrl is a payable x402 challenge. The wallet proves control by settling that dust invoice.
Exchange for a bearer token
Carry four things forward from the exchange response:
accessTokenfor authenticated requestsprincipal.subas the durable wallet identitysession.sidas the revocable session handleaccount.isNewAccountto shape signup versus repeat-login UX
Why the adapter matters
The adapter converts Gwop responses into app primitives and keeps upstream details like chain normalization, session status mapping, and logging out of route handlers.
Related pages
See the full wallet-auth lifecycle and what auth unlocks in your backend
Learn why {chain}:{address} is the durable identity you carry forward
See the raw create call and response fields in the operational docs
Check the live session state and revoke sessions when logout matters