cookpad / cp8_cli

Cookpad Global CLI
MIT License
19 stars 10 forks source link

Simplify token input #37

Open davidstosik opened 5 years ago

davidstosik commented 5 years ago

Github's Hub can fetch a token after prompting the user for username and password.

$ hub api
github.com username: davidstosik
github.com password for davidstosik (never stored): 
two-factor authentication code: 
# ...

$ cat ~/.config/hub
github.com:
- user: davidstosik
  oauth_token: CENSORED
  protocol: https

Would be nice to have something similar, or maybe we could make direct use of the hub command?

balvig commented 5 years ago

Does that automatically create a token on behalf of the user I wonder?

davidstosik commented 5 years ago

Does that automatically create a token on behalf of the user I wonder?

Yes! With only the permissions it needed.

image

balvig commented 5 years ago

Cool, sounds like a nice enhancement.