Print shorter login URL in the terminal
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 242
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 15
Description
It's sometimes hard to copy the URL from the terminal when authorizing `pub publish`. The URL has a lot of parameters and is very long, thus, some terminal emulators might break the lines and make it hard to copy.
This causes issues such as: https://github.com/dart-lang/pub-dev/issues/2611
As @isoos suggested in https://github.com/dart-lang/pub-dev/issues/2611#issuecomment-518245602 we could mitigate by printing `http://localhost:/login` in the terminal, and when the user opens this URL we can redirect to the correct sign-in URL, which then in turn redirects back to `localhost`.
This makes the URL to be copied much shorter, and doesn't introduce any state on `pub.dev`.
If the user can't open `localhost` in the browser, the login flow won't work anyways, as this is the callback URL.
Contributor guide
Research direction
Start by tracing the pub publish authorization flow and where its login URL is printed in the terminal. Done means the terminal shows a short localhost login URL and opening it completes the existing browser redirect flow without requiring state on pub.dev.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100