// Module included in the following assemblies:
//
// * authentication/identity_providers/configuring-github-identity-provider.adoc

[id="identity-provider-registering-github_{context}"]
= Registering a GitHub application

To use GitHub or GitHub Enterprise as an identity provider, you must register
an application to use.

.Procedure

. Register an application on GitHub:
** For GitHub, click https://github.com/settings/profile[Settings] ->
https://github.com/settings/developers[Developer settings] ->
https://github.com/settings/applications/new[Register a new OAuth application].
** For GitHub Enterprise, go to your GitHub Enterprise home page and then click
*Settings -> Developer settings -> Register a new application*.
. Enter an application name, for example `My OpenShift Install`.
. Enter a homepage URL, such as
`\https://oauth-openshift.apps.<cluster-name>.<cluster-domain>`.
. Optional: Enter an application description.
. Enter the authorization callback URL, where the end of the URL contains the
identity provider `name`:
+
----
https://oauth-openshift.apps.<cluster-name>.<cluster-domain>/oauth2callback/<idp-provider-name>
----
+
For example:
+
----
https://oauth-openshift.apps.example-openshift-cluster.com/oauth2callback/github/
----
. Click *Register application*. GitHub provides a Client ID and a Client Secret.
You need these values to complete the identity provider configuration.

// Module included in the following assemblies:
//
// * authentication/identity_providers/configuring-github-identity-provider.adoc

[id="identity-provider-registering-github_{context}"]
= Registering a GitHub application

To use GitHub or GitHub Enterprise as an identity provider, you must register
an application to use.

.Procedure

. Register an application on GitHub:
** For GitHub, click https://github.com/settings/profile[Settings] ->
https://github.com/settings/apps[Developer settings] ->
https://github.com/settings/developers[OAuth Apps] ->
https://github.com/settings/applications/new[Register a new OAuth application].
** For GitHub Enterprise, go to your GitHub Enterprise home page and then click
*Settings -> Developer settings -> Register a new application*.
. Enter an application name, for example `My OpenShift Install`.
. Enter a homepage URL, such as
`\https://oauth-openshift.apps.<cluster-name>.<cluster-domain>`.
. Optional: Enter an application description.
. Enter the authorization callback URL, where the end of the URL contains the
identity provider `name`:
+
----
https://oauth-openshift.apps.<cluster-name>.<cluster-domain>/oauth2callback/<idp-provider-name>
----
+
For example:
+
----
https://oauth-openshift.apps.example-openshift-cluster.com/oauth2callback/github/
----
. Click *Register application*. GitHub provides a Client ID and a Client Secret.
You need these values to complete the identity provider configuration.

Add oauth apps section to path, in case users are reading the text and not clicking the links. Choosing the Developer settings optiion on GitHub brings users to the GitHub Apps section (settings/apps) and not the OAuth Apps section (/settings/developers)
Add oauth apps section to path, in case users are reading the text and not clicking the links.
Choosing the Developer settings optiion on GitHub brings users to the GitHub Apps
section (settings/apps) and not the OAuth Apps section (/settings/developers)
