From 33807e2b1453faf619e607145886ce3812db6ed8 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 2 Jun 2026 18:21:17 -0500 Subject: [PATCH] fix(desktop): use auth-store path as xAI OAuth source_label source_label is meant to be a human-readable origin (file path / source), not the internal auth_mode string ("oauth_pkce"). Surface the auth-store path, then the source slug, then a generic label. --- hermes_cli/web_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hermes_cli/web_server.py b/hermes_cli/web_server.py index dfa0b1ac3..59b2042d4 100644 --- a/hermes_cli/web_server.py +++ b/hermes_cli/web_server.py @@ -3001,10 +3001,13 @@ def _resolve_provider_status(provider_id: str, status_fn) -> Dict[str, Any]: } if provider_id == "xai-oauth": raw = hauth.get_xai_oauth_auth_status() + # source_label is meant to be a human-readable origin (auth-store + # path / credential source), not the internal auth_mode string + # ("oauth_pkce"). Prefer the store path, then the source slug. return { "logged_in": bool(raw.get("logged_in")), "source": raw.get("source") or "xai_oauth", - "source_label": raw.get("auth_mode") or "xAI Grok OAuth", + "source_label": raw.get("auth_store") or raw.get("source") or "xAI Grok OAuth", "token_preview": _truncate_token(raw.get("api_key")), "expires_at": None, "has_refresh_token": True,