In the new Apps SDK, ChatGPT acts as an OAuth 2.1 client, and gets an access token from the OAuth 2.1 provider that allows it to make authenticated calls to the MCP server on behalf of the user.
Within an Apps SDK widget, is there any way to get the value of this OAuth token? I’d like to use it to authenticate to my backend too for plain old non-MCP API calls!
We can make authenticated requests to the MCP server as well with the window.openai tool, but, this is slow, and we don’t necessarily want to expose all API functionality as MCP tools. In the Apps SDK docs, it’s suggested that we can use a backend API to do persistence etc, but, how are we supposed to tell the backend who we are and maintain the same identity as the MCP calls?