Uh oh!
There was an error while loading. Please reload this page.
Remove username/password support; always use tokens. - #90
Conversation
tamird
commented
Jun 12, 2016
There's a lot of duplication here - I'm sure it can be cleaned up some, but I'd like to leave that to you @guybedford since I don't really know what I'm doing in JS :) I tested this locally with a token that doesn't have public_repo and things worked. |
guybedford
commented
Jun 12, 2016
Thanks, this looks good to me. The thing is, we need to retain backwards-compatibility - password authentication can't just be removed! So the prompt could perhaps read I know it's a bit of work with all that, but backwards-compatibility is the cost having users :) |
tamird
commented
Jun 12, 2016
OK I've refactored this a bit to reduce the duplication. Perhaps you could help with the backwards compatibility bit? |
| function readNetrc(hostname) { | ||
| hostname = hostname || 'github.com'; | ||
| var creds = netrc[hostname]; |
There was a problem hiding this comment.
All this deleted code needs to remain.
tamird
commented
Jun 12, 2016
OK, seems to me we can remove all the code that permits the old configuration to go in, we just need to keep the ability to read the old config. Updated. |
guybedford
commented
Jun 18, 2016
We can definitely support the better token approach here, but I can't merge this as the prompts are part of the API, we can't just remove them in this version as it will break documented workflows. |
tamird
commented
Jun 18, 2016
Ah I might just revert the prompts. I'll let you know when I've done that.
|
tamird
commented
Jun 22, 2016
Reverted the prompts! @guybedford PTAL |
guybedford
commented
Jun 24, 2016
Thanks! This looks great. I think we should be able to alter the configuration prompts though - where it says enter your token or username, we can check if they entered a token and then skip asking for a password and set the auth object to a token mode already. Let me know if that makes sense? |
tamird
commented
Jun 27, 2016
Done. |
guybedford
commented
Jun 27, 2016
Excellent, thank you again for your contributions! |
tamird
commented
Jun 27, 2016
Thanks! Could you cut a new release with this? |
guybedford
commented
Jun 27, 2016
Sure, I have done a 0.13.14. |
Fixes#89.