You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: content/v3/oauth.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,11 @@ This is a description of the OAuth2 flow from 3rd party web sites.
28
28
29
29
###Parameters
30
30
31
-
Name | Type | Description
31
+
Name | Type | Description
32
32
-----|------|--------------
33
33
`client_id`|`string` |**Required**. The client ID you received from GitHub when you[registered](https://github.com/settings/applications/new).
34
34
`redirect_uri`|`string` | The URL in your app where users will be sent after authorization. See details below about[redirect urls](#redirect-urls).
35
-
`scope`|`string` | A comma separated list of[scopes](#scopes).
35
+
`scope`|`string` | A comma separated 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.
36
36
`state`|`string` | An unguessable random string. It is used to protect against cross-site request forgery attacks.
37
37
38
38
###2. GitHub redirects back to your site
@@ -48,7 +48,7 @@ Exchange this for an access token:
48
48
49
49
###Parameters
50
50
51
-
Name | Type | Description
51
+
Name | Type | Description
52
52
-----|------|---------------
53
53
`client_id`|`string` |**Required**. The client ID you received from GitHub when you[registered](https://github.com/settings/applications/new).
54
54
`client_secret`|`string` |**Required**. The client secret you received from GitHub when you[registered](https://github.com/settings/applications/new).
@@ -188,7 +188,7 @@ Read more about these tokens on the [GitHub Help page](https://help.github.com/a
188
188
189
189
###Parameters
190
190
191
-
Name | Type | Description
191
+
Name | Type | Description
192
192
-----|------|--------------
193
193
`scopes`|`array` | A list of scopes that this authorization is in.
194
194
`note`|`string` | A note to remind you what the OAuth token is for.
@@ -217,7 +217,7 @@ exists. Otherwise, it creates one.
217
217
218
218
###Parameters
219
219
220
-
Name | Type | Description
220
+
Name | Type | Description
221
221
-----|------|--------------
222
222
`client_secret`|`string`| The 40 character OAuth app client secret associated with the client ID specified in the URL.
223
223
`scopes`|`array` | A list of scopes that this authorization is in.
@@ -245,7 +245,7 @@ Name | Type | Description
245
245
246
246
###Parameters
247
247
248
-
Name | Type | Description
248
+
Name | Type | Description
249
249
-----|------|--------------
250
250
`scopes`|`array` | Replaces the authorization scopes with these.
251
251
`add_scopes`|`array` | A list of scopes to add to this authorization.