Skip to content

Detect Grok's grok login OAuth as auth - #44

Merged
eirikb merged 1 commit into
mainfrom
feature/eirikb/grok-oauth-auth
Jul 2, 2026
Merged

eirikb merged 1 commit into
mainfrom
feature/eirikb/grok-oauth-auth

Conversation

@eirikb

@eirikb eirikb commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Surfaced by the freshly-shipped setup wizard: grok login (device OAuth) succeeds ("Signed in as …"), writes ~/.grok/auth.json, and authenticates headless against the subscription proxy — but authed() only checked XAI_API_KEY, so postmortemthis reported grok as "not signed in" and skipped it, directly contradicting the login that just completed.

auth.json is written only on login (not on install, unlike the ~/.grok dir), so it's a safe signal. Now authed() accepts either ~/.grok/auth.json or XAI_API_KEY, and the auth/fix hints mention grok login as a first-class option.

Verified: after grok login, doctor now shows grok — signed in (grok login or XAI_API_KEY). (A logged-in account still needs Grok credits/SuperGrok to actually run — that's a 403 billing wall, not an auth failure.)

`grok login` (device OAuth) writes ~/.grok/auth.json and authenticates
headless against the subscription proxy - so a user who logs in through
the setup wizard is genuinely ready. But authed() only checked
XAI_API_KEY, so a just-logged-in grok was reported "not signed in" and
skipped, contradicting the login that just succeeded.

auth.json is written only on login (not on install, unlike the ~/.grok
dir), so it is a safe signal. Recognise it, and point the auth hints at
`grok login` as a first-class option alongside the API key.
@eirikb
eirikb merged commit 45ca1e9 into main Jul 2, 2026
1 check passed
@eirikb
eirikb deleted the feature/eirikb/grok-oauth-auth branch July 2, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant