Skip to content

Dedicated authentication command #1413

Description

@mislav

Example use:

gh auth --host github.com

As I see it, these would be its broader set of features:

Subcommands:

/cc @ampinsk

Activity

  1. self-assigned this
    on Jul 27, 2020
  2. ampinsk commented on Jul 27, 2020

    @ampinsk

    Designs

    gh auth login

    Screen Shot 2020-07-27 at 1 24 21 PM

    gh auth logout

    Screen Shot 2020-07-27 at 1 24 34 PM

    gh auth status

    Screen Shot 2020-07-27 at 1 24 48 PM

    gh auth refresh

    $ gh auth refresh --scope [list]
    

    @vilmibm let me know if you need more input on the flags language, I'm cool with you taking a pass at it and I can give feedback!

  3. added
    authrelated to tokens, authentication state, or oauth
    on Jul 27, 2020
  4. mislav commented on Jul 28, 2020

    @mislav
    ContributorAuthor

    Re: “Login using the browser” prompt: I'm not sure if we give the user enough information to make a decision at this point; i.e. we don't present any alternatives to the user until they choose "no". Maybe it would be useful to present all possible options at once?

    I think it's important for the user to understand that if they choose to not login using the browser, they need to already have an authentication token ready. They might expect that skipping the browser will prompt them for username+password on the command line (a la hub), but I would want us to somehow communicate that this mode of authentication is not available, even though it's frequently asked for.

    Proposed flow:

    ? Choose your authentication method:
      Log in using a web browser
    > Paste an authentication token
    
    Tip: you can generate a Personal Access Token here https://github.com/settings/tokens
    The minimum required scopes are `repo` and `read:org`.
    ? Paste your authentication token: *************
    

    @ampinsk What do you think?

  5. vilmibm commented on Jul 28, 2020

    @vilmibm
    Contributor

    @mislav the same thing occurred to me and I went with this copy yesterday, thoughts?

    image

  6. mislav commented on Jul 28, 2020

    @mislav
    ContributorAuthor

    That looks great!

    Nit: I don't think we need to say "OAuth" since that's an implementation detail.

  7. ampinsk commented on Jul 28, 2020

    @ampinsk

    Yes thank you both for bringing this up, this is so much clearer 🙇‍♀️

    The copy @mislav proposed above made a little more sense to me at a glance. I also really like the tip! 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

authrelated to tokens, authentication state, or oauthenhancementa request to improve CLI

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions