fix: make OAuth login URL prominent for SSH/headless users
The URL is now the primary element — displayed in a bordered box before the browser auto-open attempt. Works for users who SSH into remote servers where webbrowser.open() silently fails.
This commit is contained in:
parent
46176c8029
commit
bd3b0c712b
1 changed files with 7 additions and 2 deletions
|
|
@ -463,17 +463,22 @@ def run_hermes_oauth_login() -> Optional[str]:
|
||||||
print()
|
print()
|
||||||
print("Authorize Hermes with your Claude Pro/Max subscription.")
|
print("Authorize Hermes with your Claude Pro/Max subscription.")
|
||||||
print()
|
print()
|
||||||
print("Open this link in your browser:")
|
print("╭─ Claude Pro/Max Authorization ────────────────────╮")
|
||||||
|
print("│ │")
|
||||||
|
print("│ Open this link in your browser: │")
|
||||||
|
print("╰───────────────────────────────────────────────────╯")
|
||||||
print()
|
print()
|
||||||
print(f" {auth_url}")
|
print(f" {auth_url}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
# Try to open browser automatically (works on desktop, silently fails on headless)
|
# Try to open browser automatically (works on desktop, silently fails on headless/SSH)
|
||||||
try:
|
try:
|
||||||
webbrowser.open(auth_url)
|
webbrowser.open(auth_url)
|
||||||
|
print(" (Browser opened automatically)")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
print()
|
||||||
print("After authorizing, you'll see a code. Paste it below.")
|
print("After authorizing, you'll see a code. Paste it below.")
|
||||||
print()
|
print()
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue