cliAuthBrowserURL builds the auth-approval URL we print to the user during `pad auth login`. We construct it on the CLI side rather than trusting the server-issued auth_url field: the server builds its URL from r.Host, which echoes back whatever Host header the CLI sent. If the CLI's own config poin
(cfg *config.Config, sessionCode string)
| 409 | // and returns the explicit URL verbatim for Remote/Cloud, so it's the |
| 410 | // right source of truth. |
| 411 | func cliAuthBrowserURL(cfg *config.Config, sessionCode string) string { |
| 412 | return fmt.Sprintf("%s/auth/cli/%s", cfg.BrowserURL(), sessionCode) |
| 413 | } |
| 414 | |
| 415 | // doBrowserLogin implements the browser-based CLI auth flow. |
| 416 | // It creates a pending session, prints the auth URL, and polls until approved. |