Help with OAuth Setup for Virtual Servers (Claude Web Oauth Client) #5941
Replies: 1 comment
|
Your read of the Virtual Server "enable OAuth" toggle is right — it's the client → ContextForge (resource-server) side, i.e. ContextForge validating the Matching your two logs to the verifier: Dex — # nonce and at_hash are defined only for ID tokens (OIDC Core §2);
# their presence on a bearer token is a reliable indicator ...
id_token_markers = [claim for claim in ("nonce", "at_hash") if claim in unverified]
if id_token_markers:
logger.warning("Rejecting OIDC ID token masquerading as OAuth access token ...")
return NoneDex handed back an ID token (it carries Google ( So neither upstream is producing the thing ContextForge needs: a JWT access token whose The cleaner fix: let ContextForge be the authorization server (DCR)Rather than wiring Claude Web straight at Google/Dex, point Claude Web's connector at ContextForge's own base URL and let it use Dynamic Client Registration. Claude Web (like Claude Desktop) supports the MCP OAuth flow with DCR — it discovers If you must present the upstream IdP token directlyThen it has to be an access token with an audience, not an ID token:
Given your goal (browser-based SSO from Claude Web, Google as the identity source), I'd go with DCR — it's the path designed for exactly this, and it sidesteps the ID-token-vs-access-token problem entirely instead of fighting Dex's token types. If you share whether Claude Web is discovering |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I was asked to evaluate the usage of context forge for our company. I managed to get some setup running on Google Cloud. I am currently using Google SSO which works fine for Admin UI access. Using JWT tokens with external clients to connect to configured MCP servers via the virtual servers works also fine.
Now I was asked to make it possible to use Claude Web where you can only configure OAuth for the connectors and I just cannot get it working. Maybe there is some misunderstanding on my side where and how to do it.
In the Virtual Server config screen I can enable OAuth which I understood is for the "client -> context forge" authentication, correct?
I tried Google SSO with:
-> in claude web -> I get to the google consent screen of my oauth client app and can login but then I come back with an error
I tried with a dexidp setup (that uses Google SSO internally):
-> in claude web -> I get the whole flow: Google Consent Screen -> Login -> Dex Grant Access and come back with an error to claude web
I also did the oauth flows manually for both use-cases via curl from beginning to end and it works until I get the access tokens back but context forge rejects them then in the end.
Can someone please explain how to get a working setup or where I might have a thinking error? Ideally, with Google SSO, Entra ID or if that does not work with a work-around that allows the browser based SSO? I found much of the current documentation confusing/lacking around this specific topic.
Thanks in advance,
Christian
All reactions