You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EMA leg 3 requires a resource-AS client secret, which blocks public clients the redeem already supports #2725
mintEmaResourceTokens (core/auth/ema/emaFlow.ts) refuses to start the EMA mint unless resourceClientSecret is non-empty:
if(!config.resourceClientSecret?.trim()){thrownewError("EMA requires resource authorization server client secret in server OAuth settings (Test Client secret from xaa.dev resource registration)",);}
But redeemIdJagForAccessToken, which it calls for leg 3, already handles a public client:
So the guard rules out a case the redeem supports.
Impact: A resource authorization server that registers clients with token_endpoint_auth_method: none can't be used with EMA in Inspector. That covers any server that forces none at DCR, whatever the client asks for. The user gets an error pointing at xaa.dev, which isn't the resource AS in that case.
Reproduce (2.11.0):
Register a client at a resource AS whose DCR returns token_endpoint_auth_method: none.
In Server Settings, turn on Enterprise-managed authorization. Set Resource AS Client ID to that client and leave Resource AS Client Secret empty.
Connect. It fails with EMA legs 2–3 (resource token mint): EMA requires resource authorization server client secret … before leg 2 runs.
Workaround: put any non-empty secret in the field. That only works if the AS ignores an unexpected client_secret on a public client. A strict AS would refuse it with invalid_client.
Suggested fix: drop the secret guard and keep only the resourceClientId check, so an empty secret goes through the existing none path. If a hint is still wanted, it belongs on an invalid_client response from the token endpoint, not before the request. The field's help text could also say the secret is optional for public clients.
Details the bug form would have asked for: v2 (2.11.0, latest), affected client core (core/auth/ema/emaFlow.ts; hit in Web), transport Streamable HTTP, macOS.
Suggested prompt for the fix:
In core/auth/ema/emaFlow.ts, mintEmaResourceTokens throws when resourceClientSecret is empty, but redeemIdJagForAccessToken already sends token_endpoint_auth_method: "none" when there is no secret. Remove the secret guard and keep the resourceClientId check, so a public resource-AS client can complete EMA leg 3. Add a test that an empty secret produces a leg-3 token request with no client_secret and auth method none, and update any test that asserts the old error. In the Server Settings EMA help text, say the Resource AS Client Secret is optional for public clients.
Activity
ferentinai commentedon Oct 16, 2026
Details the bug form would have asked for: v2 (2.11.0,
latest), affected client core (core/auth/ema/emaFlow.ts; hit in Web), transport Streamable HTTP, macOS.Suggested prompt for the fix:
cliffhall commentedon Oct 20, 2026
Triage: Priority Medium (total 6)
client_secret.bugBoard: #28, Status
Incoming, awaiting maintainer review (no milestone yet).cliffhall commentedon Oct 20, 2026
Shipped in #2736 (merged to v2/main).
fix(ema): allow a public resource-AS client in leg 3