Skip to content

fix(auth): default iris login to production server URL#59

Closed
frafaelcb wants to merge 2 commits into
mainfrom
fix/iris-login-default-server-url
Closed

fix(auth): default iris login to production server URL#59
frafaelcb wants to merge 2 commits into
mainfrom
fix/iris-login-default-server-url

Conversation

@frafaelcb
Copy link
Copy Markdown

@frafaelcb frafaelcb commented May 20, 2026

Summary

DEFAULT_SERVER e outros dois fallbacks no código usavam http://localhost:3000 quando IRIS_SERVER_URL não estava definida. Usuários executando iris login (ou iris install) sem configuração prévia eram direcionados para localhost em vez da plataforma de produção.

Além disso, IRIS_SERVER_URL não estava documentada no README — usuários de dev local não tinham como saber que podiam sobrescrevê-la.

Arquivos alterados:

Arquivo Linha Mudança
iris/platform/auth.py 14 fallback browser_login → produção
iris/cli.py 872 fallback iris login --token → produção
iris/cli.py 1275 fallback iris install → produção
README.md tabela de env vars IRIS_SERVER_URL documentada

Comportamento

Cenário Antes Depois
iris login (sem flags, sem env) abre http://localhost:3000/cli/authorize?... abre https://iris.clickbus.com/cli/authorize?...
iris login --token <tok> usava http://localhost:3000 usa https://iris.clickbus.com
iris install baixava de http://localhost:3000/install.sh baixa de https://iris.clickbus.com/install.sh
IRIS_SERVER_URL=http://localhost:3000 iris login abre localhost abre localhost (sem mudança)
iris login --server http://localhost:3000 abre localhost abre localhost (sem mudança)

Test Plan

  • iris login sem configuração — confirmar que abre https://iris.clickbus.com/cli/authorize?...
  • IRIS_SERVER_URL=http://localhost:3000 iris login — confirmar que ainda abre localhost
  • iris login --server http://localhost:3000 — confirmar que ainda abre localhost
  • iris install — confirmar que baixa de https://iris.clickbus.com/install.sh
  • README: confirmar que IRIS_SERVER_URL aparece na tabela de variáveis de ambiente

🤖 Generated with Claude Code

`DEFAULT_SERVER` was falling back to `http://localhost:3000` when the
`IRIS_SERVER_URL` env var was not set. Users running `iris login` without
any flags were being sent to a local address instead of the production
platform.

Changed the fallback to `https://iris.clickbus.com` so the browser-based
OAuth flow targets production out of the box. The `IRIS_SERVER_URL` env
var and `--server` flag continue to work as overrides for local dev.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickbus-iris Ready Ready Preview, Comment May 20, 2026 11:20am

Request Review

…_URL

Two more places in cli.py still fell back to http://localhost:3000:
- iris login --token (manual/CI login path)
- iris install (fetches install.sh from the platform)

Both updated to https://iris.clickbus.com to match auth.py.

Also added IRIS_SERVER_URL to the README environment variables table
so users know how to override it for local development.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@frafaelcb
Copy link
Copy Markdown
Author

Analisar depois pssibildiade de usar URL na vercel.

@frafaelcb frafaelcb closed this May 20, 2026
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