cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

Add More Succinct Way to "Copy/Paste" Login URL

Open sl33nyc opened this issue 3 years ago • 1 comments

Describe the feature you'd like

I'd like to "copy and paste" the URL from a terminal that doesn't have access to a web browser. Generally, it's too laborious to get the login URL into or out of the session where cloudflared login was initiated.

Describe alternatives you've considered

  1. Output QR Encoded Login URL. See #610.
  2. Pipe to grep which extracts the login URL and passes it to qrencode. I'm more than happy to not "clutter" up the code with a randomish QR encoding library, but it already doesn't feel UNIX-ish to open the browser on behalf of the user before outputting the URL to the console. Moreover, this alternative causes other useful output like the "Waiting` for login..." poll to be missed.
  3. (1) Introduce a "quiet" mode which only outputs the login URL then exits and (2) a separate "polling" mode for the "Waiting for login...". The first part seems straightforward, but at first glance, the second part seems trickier since there's some transient state ("cloudflared_pub.pem"?) that the poller needs.

Additional context In reference to #610.

cc: @sssilver

sl33nyc avatar Apr 07 '22 12:04 sl33nyc

@sssilver any thoughts? This fell off my radar but I'm still interested in finding a more desirable solution. (Maybe 3?)

sl33nyc avatar May 01 '22 12:05 sl33nyc