Repository navigation
new auth flow UX - #1548
new auth flow UX#1548
Conversation
tierninho
left a comment
There was a problem hiding this comment.
Ran through the various scenarios, and all login methods were a success. All the new messaging was present as long as new cool graphic. ✅
-
I don't think we should fix anything, but just want to point out what a narrow terminal does to the graphic
-
Also, do we want to update GitHub Enterprise to GitHub Enterprise Server? More info desktop/desktop#7728
mislav
left a comment
There was a problem hiding this comment.
Love the banner!
My main concern is about having all our bases covered and the fact that with this approach, we have to annotate all leaf commands, meaning that if we add another gh auth subcommand, we have to copy over the annotation. I've proposed a workaround.
Also, as noted in a comment, Cobra pseudo-commands such as help and __complete should never trigger authentication in my view, and also requesting help via -h (where available) and --help.
| ,KMM0;.;:;. dMMMMMMMMK, | ||
| :OWMXOOOc dMMMMMWO: | ||
| .:kXMMd dMMXk:. | ||
| Have a good one~ ,l. .l, |
There was a problem hiding this comment.
“Have a good one” is a colloquialism, and furthermore one that is not always used in good faith. Keeping non-native English speaking people in mind, could we use something simpler, e.g. “happy hacking!”, or nothing at all?
| return &cmdutil.FlagError{Err: err} | ||
| }) | ||
|
|
||
| // TODO does this make sense? I'd like people to be able to see usage without an auth message. |
There was a problem hiding this comment.
Hmm that's a great point. We likely don't want an auth check on commands such as gh, gh pr, gh pr create --help, gh help ..., and similar
There was a problem hiding this comment.
I'm okay with gh pr create --help not working for now; there's always gh help and that specific help page isn't going to help much without auth (unlike the root help)
| 'oONMMMMMMMMMMMMNOo' | ||
| 'dXMMMMMMMMMMMMMMMMMMMMXd' | ||
| .kMMMMMMMMMMMMMMMMMMMMMMMMMMk. | ||
| To authenticate, please lWMMMM:.'ckXKOkkkkOKXkc'.:MMMMWl | ||
| run 'gh auth login'. oMMMMMM. .MMMMMMo | ||
| ;WMMMMMX. .XMMMMMW; | ||
| 0MMMMMK. .KMMMMM0 | ||
| You can also set the MMMMMMl lMMMMMM | ||
| GITHUB_TOKEN environment MMMMMMd dMMMMMM | ||
| variable, if preferred. KMMMMMN' 'NMMMMMK | ||
| cMMMMMMNc cNMMMMMMc | ||
| xMMNdkXMNkl;,. .,;lkNMMMMMMMx | ||
| xWMNx;kWMMMK. .KMMMMMMMMMWx | ||
| ,KMM0;.;:;. dMMMMMMMMK, | ||
| :OWMXOOOc dMMMMMWO: | ||
| .:kXMMd dMMXk:. |
There was a problem hiding this comment.
I put in a TerminalSize check so as not to print this if the terminal width is too narrow (thanks @tierninho for pointing that out)
This comment has been minimized.
This comment has been minimized.
|
cc @ampinsk for ascii art sign off >_> |
|
I hate to be a bummer, but I don't think we should do the ascii art 😞 I'm concerned about how this will show up for users with voice over! I think it could be really confusing, especially on first run. I would love to include something welcoming like this though, but maybe that could take the form of emoji if we can exclude Windows (where it won't render correctly)? |
|
that's fair, @ampinsk ; for now I've just taken out the ascii art. |
mislav
left a comment
There was a problem hiding this comment.
This looks and works great, thank you!
Should alias commands be allowed in no-auth mode?
$ gh alias list
Welcome to GitHub CLI!
To authenticate, please run `gh auth login`.
|
good catch @mislav , I just missed aliases when I re-did the disable auth check thing |

This PR:
gh auth loginif there is no auth configgh auth logincloses #1511