OktaVanshika Pandey | November 23, 2026 |10 min read| Code |Tutorial
Implement Secure Cross App Access (XAA) in Go
Summary
Cross App Access (XAA) is an emerging standard that lets AI agents securely access other apps on a user’s behalf without shared credentials or consent screens. The post walks through building a Go web app called AI Notes Assistant that uses XAA to fetch a user’s to-do items from a protected MCP server and turn them into notes. The flow involves signing in with OIDC and PKCE, exchanging the ID token for an Identity Assertion Authorization Grant (ID-JAG) via RFC 8693, then exchanging that for a scoped access token via RFC 7523. The app uses the access token to call the MCP server’s Streamable HTTP transport and read the todo0://todos resource. The project is available on GitHub and runs against the xaa.dev playground for testing.
Context
AI agents need to access other apps on a user’s behalf without shared credentials or consent screens. XAA is an emerging standard that uses an identity provider to issue signed identity assertions and scoped access tokens, enabling secure cross-app access.
Approach / What changed
The post implements a Go web app called AI Notes Assistant that performs the XAA flow: the user signs in with OIDC and PKCE, the app exchanges the ID token for an ID-JAG via RFC 8693, then exchanges that for a scoped access token via RFC 7523, and finally uses the access token to call an MCP server’s Streamable HTTP transport to read the todo0://todos resource.
Takeaways
XAA uses two standard token exchanges: RFC 8693 to exchange an OIDC ID token for an ID-JAG, and RFC 7523 to exchange the ID-JAG for a scoped access token.
The Go app implements the XAA flow with OIDC sign-in using PKCE, then programmatic token exchanges without any user consent prompts.
The MCP server is called using the scoped access token attached via a custom bearerTransport, and the app reads the todo0://todos resource to fetch to-do items.
FAQ
What is Cross App Access (XAA)?
XAA is an emerging standard that helps apps and AI agents securely access other apps on a signed-in user's behalf. It uses an identity provider to issue signed identity assertions and scoped access tokens, eliminating the need for shared credentials or consent screens.
How does the XAA token exchange work in Go?
The Go app first exchanges the OIDC ID token for an ID-JAG using RFC 8693 token exchange. Then it exchanges that ID-JAG for a scoped access token using RFC 7523 JWT Bearer Grant. Both exchanges are implemented in internal/xaa/tokenexchange.go.
What is the role of the MCP server in this tutorial?
The MCP server is a protected resource that exposes to-do items via the todo0://todos resource. The Go app uses the scoped access token to connect to the MCP server via Streamable HTTP transport and reads the to-do data, which it reshapes into notes.
Source and freshness
- Source
- developer.okta.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.