anvil auth login: open browser to PAT page automatically (interim UX while device flow is built) #19
closed
Opened by cole.christensen@gmail.com
Links
No links yet.
Problem
Until OAuth device flow lands (separate ticket), the manual PAT paste flow is unavoidable. But we can shorten it from “user must navigate the web UI themselves” to “we open the right page for them”.
Proposal
When `anvil auth login` reaches the “Personal access token” prompt:
- Print: `Opening https:///users/settings/tokens — create a token there, then paste it here.`
- Try to open the browser via `open` (macOS) / `xdg-open` (Linux) / `start` (Windows).
- If the open command fails (headless box, no display), just print the URL and continue with the prompt.
Trivial change. Removes the “where do I even go” step. Leaves room for the device-flow ticket to supersede this entirely.
Acceptance criteria
- At the PAT prompt, print the create-PAT URL and attempt to open it
- Failure to open is non-fatal; prompt still works
- Cross-platform open (macOS / Linux / Windows)
- `–no-browser` flag to suppress the open attempt
Depends on
`fangorn/anvil` ticket for the PAT-management UI to actually exist at `/users/settings/tokens`. Without that page, opening the URL leads nowhere useful.
Origin
User feedback: “anvil auth login sucks”.