cloudflare / cloudflare/cloudflared

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

Open
#615 1 comment 0 reactions 0 assignees View on GitHub
Needs clarification Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**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.
1. 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.
1. (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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.