Issue details
Authorizing a Grok Team subscription completes the browser callback and authorization-code exchange, but Fx then fails with GrokUserInfoRequestFailed instead of producing a usable Grok session.
The failure occurs because Fx unconditionally retrieves the subscription account identity from /oauth2/userinfo. Team access tokens identify the selected subscription principal through principal_type and principal_id claims instead; that principal is not a personal userinfo identity. The refresh request also omits those Team principal fields, so it cannot preserve the selected Team principal.
Steps to reproduce:
- Start
fx login grok and choose the subscription login flow.
- Authorize a Grok Team subscription in the browser.
- Complete the callback.
- Observe that Fx fails during the subsequent userinfo request with
GrokUserInfoRequestFailed.
Expected behavior:
- Team authorization completes and the selected Team principal becomes the stored subscription identity.
- Refresh requests retain that same Team principal.
- Personal/User principals continue using the existing authenticated userinfo path and do not send Team principal fields during refresh.
The causal path was reproduced without including any OAuth payloads or account identifiers. A focused fix and end-to-end proof are in #456.
Sensitive information
Issue details
Authorizing a Grok Team subscription completes the browser callback and authorization-code exchange, but Fx then fails with
GrokUserInfoRequestFailedinstead of producing a usable Grok session.The failure occurs because Fx unconditionally retrieves the subscription account identity from
/oauth2/userinfo. Team access tokens identify the selected subscription principal throughprincipal_typeandprincipal_idclaims instead; that principal is not a personal userinfo identity. The refresh request also omits those Team principal fields, so it cannot preserve the selected Team principal.Steps to reproduce:
fx login grokand choose the subscription login flow.GrokUserInfoRequestFailed.Expected behavior:
The causal path was reproduced without including any OAuth payloads or account identifiers. A focused fix and end-to-end proof are in #456.
Sensitive information