Last updated

GitHub login

To enable users to log in with GitHub, first activate GitHub login in the builder and then set up an application with GitHub to serve as the OAuth provider.


Follow these steps for a smooth integration.

Enabling GitHub login in builder

  1. Navigate to Home and open the Login Box builder.
  2. In the left panel, toggle GitHub to on.

GitHub-Login-1

After modifying any settings, commit your changes and publish them to apply across your environments.

Creating a GitHub app

Complete the following steps to configure GitHub login.

Moving between environments

When migrating a project between environments (e.g., from development to production), Frontegg automatically transfers your social login settings.

Step 1: Register an application

  1. In your GitHub account, navigate to Organization Account Settings.

GitHub-Login-2

  1. Go to Developer settingsOAuth Apps.

GitHub-Login-3

  1. Click New OAuth App and fill in the application name and details. For the callback URL, enter your application URL (use your Frontegg domain if using hosted login or your app domain if using embedded login), followed by /account/social/success.

GitHub-Login-4

GitHub-Login-5

Organization vs Personal Account

You do not need a GitHub Organization to enable GitHub social login. If using a personal account, go to SettingsDeveloper SettingsOAuth AppsNew OAuth App and follow similar steps.

Step 2: Generate credentials

Once your application is created, you will be redirected to the application configuration screen.

GitHub-Login-6

  1. Under Client secrets, click Generate a new client secret and save the generated secret.

GitHub-Login-7

Step 3: Enter credentials in Frontegg

  1. Go to [ENVIRONMENT] → Authentication → Social Logins.

GitHub-Login-8

  1. Click the GitHub manage button.
  2. Enter your GitHub Client ID, Client Secret, and Redirect URL, then save and publish.

GitHub-Login-9

Step 4: Test the GitHub login button

  1. On your login screen, verify that the GitHub button appears and redirects to the GitHub OAuth consent screen for login.

GitHub-Login-10

  1. Test to confirm functionality.

GitHub-Login-11

Configuring GitHub Login Permissions

By default, only invited users can log in with GitHub. To allow new users to sign up via GitHub, enable Allow Signup in the Login Box builder's left panel.

Customizing authentication scopes for GitHub

Scopes specify the type of information your application can access after users grant permission. The generated access token will include these approved scopes. By default, Frontegg fetches user profile and email as the standard scopes when users authenticate via their GitHub account.

To add additional custom scopes, navigate to [ENVIRONMENT] → Authentication → Social logins → Custom → Scopes on the Frontegg portal. You can check GitHub's supported scopes here.