2017-05-15 02:36:40 +00:00
|
|
|
# Developer OAuth App
|
|
|
|
|
2018-02-01 23:08:53 +00:00
|
|
|
Because GitHub Desktop uses [OAuth web application flow](https://developer.github.com/v3/oauth/#web-application-flow)
|
2017-05-15 02:36:40 +00:00
|
|
|
to interact with the GitHub API and perform actions on behalf of a user, it
|
|
|
|
needs to be bundled with a Client ID and Secret.
|
|
|
|
|
2018-02-01 23:08:53 +00:00
|
|
|
For external contributors, we have bundled a developer OAuth application
|
|
|
|
with the Desktop application so that you can complete the sign in flow locally
|
2017-05-15 02:36:40 +00:00
|
|
|
without needing to configure your own application.
|
|
|
|
|
2018-11-08 15:57:24 +00:00
|
|
|
These are listed in [app/app-info.ts](https://github.com/desktop/desktop/blob/85cf9dbae5055cc4f0de9fb4f7046cd32607e877/app/app-info.ts#L9-L10).
|
2017-05-15 02:36:40 +00:00
|
|
|
|
2017-05-15 02:40:29 +00:00
|
|
|
**DO NOT TRUST THIS CLIENT ID AND SECRET! THIS IS ONLY FOR TESTING PURPOSES!!**
|
2017-05-15 02:36:40 +00:00
|
|
|
|
2018-02-01 23:08:53 +00:00
|
|
|
The limitation with this developer application is that **this will not work
|
|
|
|
with GitHub Enterprise**. You will see sign-in will fail on the OAuth callback
|
|
|
|
due to the credentials not being present there.
|
2017-05-15 02:36:40 +00:00
|
|
|
|
|
|
|
## Provide your own Client ID and Secret
|
|
|
|
|
|
|
|
The OAuth client ID and Client Secret are bundled into the application with
|
|
|
|
webpack. If you want to provide your own Client ID and Client Secret, set these
|
|
|
|
environment variables:
|
|
|
|
|
2018-02-01 23:08:53 +00:00
|
|
|
- `DESKTOP_OAUTH_CLIENT_ID`
|
|
|
|
- `DESKTOP_OAUTH_CLIENT_SECRET`
|