This app is the browser-side trust boundary for AGW session approval. It is not a general control plane.
- onboarding and delegated signer approval
- finalize-init callback token creation
- revoke flow
- callback verification key publication
/session/new: onboarding entrypoint/session/revoke: revoke entrypoint
For /session/new:
callback_urlchain_idauth_pubkey
callback_url must already contain a state query parameter before the app finalizes or revokes.
Validation lives in:
src/lib/onboarding-params.tssrc/lib/redirect.ts
POST /api/session/provisionPOST /api/session/finalize-initGET /api/session/revokePOST /api/session/revokeGET /api/session/callback-key
The app redirects back to the loopback callback_url with:
session=<signed-token>
The token is a compact signed payload, not raw base64url JSON. It uses an EdDSA signature envelope produced by src/lib/server/callback-attestation.ts.
For init, the signed payload includes:
version: 2action: "init"stateaccountAddressunderlyingSignerAddresschainIdwalletIdsignerTypesignerIdpolicyIdssignerFingerprintsignerLabelsignerCreatedAtpolicyMetacapabilitySummary- freshness claims such as
iss,iat, andexp
For revoke, the signed payload includes:
version: 2action: "revoke"stateaccountAddressunderlyingSignerAddresschainIdwalletIdsignerTypesignerIdrevokedAt- freshness claims such as
iss,iat, andexp
The onboarding wizard is centered in src/stores/useSessionWizardStore.ts.
Primary states:
not_logged_inselect_policycreatingsuccesserror
Error recovery routes the user back through policy selection rather than directly to the initial login state.