README.md in octokit-7.2.0 vs README.md in octokit-8.0.0

- old
+ new

@@ -211,20 +211,12 @@ user = client.user user.login # => "defunkt" ``` -You can [create access tokens through your GitHub Account Settings](https://help.github.com/articles/creating-an-access-token-for-command-line-use) -or with a basic authenticated Octokit client: +You can [create access tokens through your GitHub Account Settings](https://help.github.com/articles/creating-an-access-token-for-command-line-use). -```ruby -client = Octokit::Client.new(:login => 'defunkt', :password => 'c0d3b4ssssss!') - -client.create_authorization(:scopes => ["user"], :note => "Name of token") -# => <your new oauth token> -``` - ### Two-Factor Authentication [Two-Factor Authentication](https://help.github.com/articles/about-two-factor-authentication) brings added security to the account by requiring more information to login. Using two-factor authentication for API calls is as simple as adding the [required header](http://developer.github.com/v3/auth/#working-with-two-factor-authentication) as an option: @@ -233,21 +225,9 @@ client = Octokit::Client.new \ :login => 'defunkt', :password => 'c0d3b4ssssss!' user = client.user("defunkt", :headers => { "X-GitHub-OTP" => "<your 2FA token>" }) -``` - -As you can imagine, this gets annoying quickly since two-factor auth tokens are very short lived. So it is recommended to create an oauth token for the user to communicate with the API: - -```ruby -client = Octokit::Client.new \ - :login => 'defunkt', - :password => 'c0d3b4ssssss!' - -client.create_authorization(:scopes => ["user"], :note => "Name of token", - :headers => { "X-GitHub-OTP" => "<your 2FA token>" }) -# => <your new oauth token> ``` ### Using a .netrc file Octokit supports reading credentials from a netrc file (defaulting to