PingOne

Adding an identity provider - GitHub

Adding GitHub as an external identity provider (IdP) gives your users the option to sign in with their GitHub accounts when accessing your application.

Before you begin

Ensure that the application is added to PingOne.

Set the Grant Type for the application to Implicit.

Learn more in Adding an application.

Creating your application on GitHub

Before you can set up GitHub as an external IdP, you must create an application on GitHub. GitHub will generate a Client ID and Client Secret for the application. For more information, see https://docs.github.com/en/developers/apps/creating-an-oauth-app.

Steps

  1. Go to GitHub at https://github.com/.

    If you don’t have a GitHub account, you can create one now.

  2. In the upper right, click your profile photo, and then click Settings.

  3. On the left, click Developer Settings.

  4. On the left, click OAuth Apps.

  5. Click the New OAuth App button.

    If you haven’t created an app before, you’ll see the button as Register a new application.

  6. Enter the following:

    • Application name: The display name for the application.

    • Homepage URL: The full URL to your application home page.

    • Application description: A description for your application that all users will see.

    • Authorization callback URL: The path in your application that users are redirected to after they have authenticated with GitHub. Leave this value blank for now.

  7. Leave the GitHub page open to return later and enter the Authorization callback URL after you have created the application in PingOne.

Adding GitHub as an identity provider in PingOne

Configure the identity provider connection in PingOne.

Before you begin

Ensure that registration is enabled in the authentication policy you want to use. See Editing an authentication policy.

Steps

  1. In PingOne, go to Integrations → External IdPs.

  2. Click Add Provider.

  3. Click GitHub.

  4. On the Create Profile page, enter the following information:

    • Name: A unique identifier for the identity provider.

    • Description: (Optional). A brief description of the identity provider.

    You cannot change the icon and login button, in accordance with the provider’s brand standards.

  5. Click Next.

  6. On the Configure Connection page, copy the value for Redirect URI to a secure location.

  7. Leave the PingOne page open to return and enter the Client ID and Client Secret after you have created the application on GitHub.

Finishing creating the application on GitHub

Add the redirect URI from PingOne to your application on GitHub.

Before you begin

Ensure you have copied the redirect URI from PingOne.

Steps

  1. Go to the Register a new OAuth application page on GitHub.

  2. For Authorization callback URL, enter the value for Redirect URI that you copied from PingOne.

  3. Click Register application.

Finishing adding the identity provider in PingOne

After you have registered the application with GitHub, copy the values for client ID and client secret and enter them into PingOne.

Before you begin

Ensure that you have copied the values for client ID and client secret from GitHub.

Steps

  1. Return to GitHub.

  2. In the OAuth Apps section, select the appropriate application.

  3. Locate the Client ID and Client Secret, and copy the values to a secure location.

  4. In PingOne, on the Configure Connection page, enter the following values:

    • Client ID: The application identifier that you copied from the IdP. You can find this information on GitHub.

    • Client Secret: The application secret that you copied from the IdP. You can find this information on GitHub.

  5. Click Save and Continue.

  6. On the Map Attributes page, define how the PingOne user attributes are mapped to identity provider attributes. For more information, see Mapping attributes.

    • Enter the PingOne user profile attribute and the external IdP attribute. For more information about attribute syntax, see Identity provider attributes.

    • To add an attribute, click Add attribute.

    • To use the expression builder, click Build and test or Advanced Expression. See Using the expression builder.

    • Select the update condition, which determines how PingOne updates its user directory with the values from the identity provider. The options are:

      • Empty only: Update the PingOne attribute only if the existing attribute is empty.

      • Always: Always update the PingOne directory attribute.

    You can map the following attributes provided by GitHub.

    • Avatar URL

    • Blog

    • Company

    • Email

    • HTML URL

    • User ID

    • Location

    • Login

    • Name

    • Node ID

    • Site Admin

    • Type

    • URL

  7. Click Save and Finish.

Next steps