Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 905164e

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent a243780 commit 905164e

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

content/v3/oauth.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: OAuth
66

77
{:toc}
88

9-
OAuth2 is a protocol that lets external apps request authorization to
9+
OAuth2 is a protocol that lets external applications request authorization to
1010
private details in a user's {{ site.data.variables.product.product_name }} account without getting their
1111
password. This is preferred over [Basic Authentication](/v3/auth#basic-authentication) because tokens can
1212
be limited to specific types of data, and can be revoked by users at any
@@ -34,8 +34,8 @@ This is a description of the OAuth2 flow from 3rd party web sites.
3434
Name | Type | Description
3535
-----|------|--------------
3636
`client_id`|`string` | **Required**. The client ID you received from GitHub when you [registered](https://github.com/settings/applications/new).
37-
`redirect_uri`|`string` | The URL in your app where users will be sent after authorization. See details below about [redirect urls](#redirect-urls).
38-
`scope`|`string` | A space delimited list of [scopes](#scopes). If not provided, `scope` defaults to an empty list of scopes for users that don't have a valid token for the app. For users who do already have a valid token for the app, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the same scopes that were used last time the user completed the flow.
37+
`redirect_uri`|`string` | The URL in your application where users will be sent after authorization. See details below about [redirect urls](#redirect-urls).
38+
`scope`|`string` | A space delimited list of [scopes](#scopes). If not provided, `scope` defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with `user` scope and another token with `repo` scope, a third web flow that does not provide a `scope` will receive a token with `user` and `repo` scope.
3939
`state`|`string` | An unguessable random string. It is used to protect against cross-site request forgery attacks.
4040
`allow_signup`|`string` | Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. The default is `true`. Use `false` in the case that a policy prohibits signups.
4141

@@ -57,7 +57,7 @@ Name | Type | Description
5757
`client_id`|`string` | **Required**. The client ID you received from GitHub when you [registered](https://github.com/settings/applications/new).
5858
`client_secret`|`string` | **Required**. The client secret you received from GitHub when you [registered](https://github.com/settings/applications/new).
5959
`code`|`string` | **Required**. The code you received as a response to [Step 1](#1-redirect-users-to-request-github-access).
60-
`redirect_uri`|`string` | The URL in your app where users will be sent after authorization. See details below about [redirect urls](#redirect-urls).
60+
`redirect_uri`|`string` | The URL in your application where users will be sent after authorization. See details below about [redirect urls](#redirect-urls).
6161
`state`|`string` | The unguessable random string you optionally provided in [Step 1](#1-redirect-users-to-request-github-access).
6262

6363
### Response
@@ -79,6 +79,19 @@ header:
7979
<access_token>e72e16c7e42f292c6912e7710c838347ae178b4a</access_token>
8080
</OAuth>
8181

82+
#### Multiple tokens
83+
84+
GitHub allows multiple tokens to exist for a user/application/scope combination.
85+
This can be used to create tokens for specific use cases. For example, your
86+
application might support one workflow that uses GitHub for sign in, and only
87+
requires basic user information. And, your application might support a different
88+
workflow that requires access to a user's private repositories. Using multiple
89+
tokens, your application can perform the web flow for each use case, requesting
90+
only the scopes needed. If a user only uses your application to sign in, they
91+
are never required to grant your application access to their private
92+
repositories. Note, there is a limit to the number of tokens that are issued per
93+
user/application/scope combination. If your application requests enough tokens
94+
to go over one of the limits, older tokens will stop working.
8295

8396
#### Requested scopes vs. granted scopes
8497

@@ -319,7 +332,7 @@ and get a new code.
319332
Users can review and revoke their application authorizations from the [settings
320333
screen within GitHub][authorized-apps]. A user's organizations [control whether
321334
an application can access organization data][org-app-policies]. Integrators can
322-
deep link to the authorization information for their particular app to let their
335+
deep link to the authorization information for their particular application to let their
323336
end users review these details.
324337

325338
To build this link, you'll need your OAuth application's `client_id` you

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy