hermes - 💡(How to fix) Fix OAuth loopback login broken for remote/browser-based consoles (GCP, Codespaces, etc.) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

When running hermes model (or any OAuth login) on a remote VM or browser-based console (GCP Cloud Shell, AWS EC2 Instance Connect, GitHub Codespaces, etc.), OAuth flows fail because the authorization URL contains a hardcoded redirect_uri=http://127.0.0.1:<port>/callback.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Problem

When running hermes model (or any OAuth login) on a remote VM or browser-based console (GCP Cloud Shell, AWS EC2 Instance Connect, GitHub Codespaces, etc.), OAuth flows fail because the authorization URL contains a hardcoded redirect_uri=http://127.0.0.1:<port>/callback.

After the user authorizes in their local browser, the provider redirects back to 127.0.0.1 on the remote machine, which is unreachable. The existing SSH tunnel hint only helps users with a real local SSH client — it provides no path forward for browser-only remote consoles.

Solution Implemented

Added a reusable _oauth_prompt_manual_code() helper that allows users to complete OAuth login by pasting either the full failed callback URL or just the authorization code.

The helper was integrated into the xAI Grok OAuth flow (and prepared for Spotify). Users can now simply paste the code when the browser redirect fails, and authentication completes successfully.

Changes

  • New helper: _oauth_prompt_manual_code() in hermes_cli/auth.py
  • Refactored xAI OAuth login to use the helper
  • Supports both full callback URL and raw code input

The fix has been tested and confirmed working on a remote GCP VM.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix OAuth loopback login broken for remote/browser-based consoles (GCP, Codespaces, etc.) [1 pull requests]