1
0
mirror of synced 2025-12-22 03:16:52 -05:00

[bug fix] GHES 3.0 and earlier incorrectly includes OAuth Device Flow beta Documentation (#21244)

* Update versioning for GHES

* fix spacing

* Add reviewer feedback

* Version other mentions of "device flow"
This commit is contained in:
Ethan Palm
2021-09-07 10:24:31 -07:00
committed by GitHub
parent 586133a2ac
commit 01e6a909de
2 changed files with 14 additions and 6 deletions

View File

@@ -24,8 +24,12 @@ When your GitHub App acts on behalf of a user, it performs user-to-server reques
To authorize users for standard apps that run in the browser, use the [web application flow](#web-application-flow).
{% ifversion fpt or ghae or ghes > 3.0 %}
To authorize users for headless apps without direct access to the browser, such as CLI tools or Git credential managers, use the [device flow](#device-flow). The device flow uses the OAuth 2.0 [Device Authorization Grant](https://tools.ietf.org/html/rfc8628).
{% endif %}
## Web application flow
Using the web application flow, the process to identify users on your site is:
@@ -112,20 +116,22 @@ For example, in curl you can set the Authorization header like this:
curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/user
```
{% ifversion fpt or ghae or ghes > 3.0 %}
## Device flow
{% ifversion ghes < 3.1 %}
{% note %}
**Note:** The device flow is in public beta and subject to change.
{% endnote %}
{% endif %}
The device flow allows you to authorize users for a headless app, such as a CLI tool or Git credential manager.
For more information about authorizing users using the device flow, see "[Authorizing OAuth Apps](/developers/apps/authorizing-oauth-apps#device-flow)".
{% endif %}
## Check which installation's resources a user can access