Beta

OAuth Identifiers

GitHub

Use GitHub as an authentication strategy for your users

Enabling GitHub as an authentication provider, means that your users can authenticate to your app via their GitHub Accounts.

Where I Can Configure It?

  • If you haven't, setup your account first
  • Go to your environment Config sections
  • In the left sidebar, choose Social Identifiers.
  • Choose the GitHub section

Using Shared Credentials

Shared credentials only available in Development Environment

You can test things out quickly by using shared GitHub OAuth credentials managed by CakeAuth. This way, you can use GitHub OAuth credentials without setting up your GitHub Developer credentials.

Setting up Custom Credentials

Get GitHub Custom Credentials

To use your own GitHub OAuth credentials:

  1. Navigate to your GitHub Developer Settings
    • Or, If you're an organization, go to https://github.com/organizations/<your_org>/settings/applications
  2. Click New OAuth App
  3. In "Application name", type the name of your app
  4. In the Homepage URL setting, select Add URI and add your domain (e.g., https://your-domain.com).
    • For local development, add http://localhost:PORT (replace PORT with the port number of your local development server).
  5. In the Callback URL or Authorization callback URL settings:
    • (Recommended) Paste the Default Redirect URI value you get from the CakeAuth Dashboard
    • Or if you want to manage your own OAuth callback, paste the redirect URI link for the callback

Managing your own OAuth callback means you also need to verify and issue a token manually yourself.

  1. Click Create GitHub App or Register Application. You'll be redirected to your app's General page.

  2. Select Generate a new client secret. Save the Client ID and Client Secret somewhere secure.

Set up Custom Credentials

  • After creating your GitHub OAuth credentials, you should have the Client ID & and Client Secret.
  • Go to the Config > Social Identifiers > GitHub
  • Set the values in the Custom Credentials section in the CakeAuth dashboard.

Last updated on

On this page