Skip to content

Commit

Permalink
[docs] Add using GitHub app authentication in README
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfloyd authored Jan 3, 2023
2 parents 5a26f63 + fb60ec8 commit a18f3a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Upgrading? Check the [Upgrade Guide](#upgrading-guide) before bumping to a new
3. [Two-Factor Authentication](#two-factor-authentication)
4. [Using a .netrc file](#using-a-netrc-file)
5. [Application authentication](#application-authentication)
6. [GitHub App](#github-app)
8. [Pagination](#pagination)
1. [Auto pagination](#auto-pagination)
9. [Working with GitHub Enterprise](#working-with-github-enterprise)
Expand Down Expand Up @@ -298,6 +299,15 @@ user = client.user 'defunkt'
[access scopes]: http://developer.github.com/v3/oauth/#scopes
[app-creds]: http://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications

### GitHub App
Octokit.rb also supports authentication [using a GitHub App](https://docs.github.com/en/developers/apps/managing-github-apps/installing-github-apps), which [requires a generated JWT token](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app).

```ruby
client = Octokit::Client.new(:bearer_token => "<your jwt token>")
client.app
# => about GitHub App info
```

## Default results per_page

Default results from the GitHub API are 30, if you wish to add more you must do so during Octokit configuration.
Expand Down

0 comments on commit a18f3a2

Please sign in to comment.