GitHub Login

To enable your users to login with GitHub, you must enable GitHub login in the builder and then create an application with GitHub to serve as the OAuth provider.

Read below to learn how.

Enable In Builder

Go to Home and click on the Login Box builder.

In the left panel, toggle the switch to on for GitHub.



When making changes to the settings in the builder, be sure to commit your changes and then publish for them to take effect and to configure them in your environments.

Create GitHub App

Follow the steps to below to configure GitHub login.


Moving Environments

When moving a project from one environment to another, Frontegg moves the social login environment configurations for you. For instance, if moving from development to production, Frontegg moves the development social login configurations to production.

Step 1: Register an Application

On your GitHub account, navigate to your Organization Account Settings.


Click Register an application and fill the application name and details. Under the callback URL, enter your frontend application URL followed by the string /account/social/success as shown below.



Organization vs Personal Account

You do not need to have a GitHub Organization to allow GitHub social login. If using your personal account, in GitHub visit Settings ➜ Developer Settings ➜ OAuth Apps ➜ New OAuth App and follow similar steps.

Step 2: Generate Credentials

Now that your application is created, you should be redirected to the application configuration screen.


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


Step 3: Enter Credentials In Frontegg

Go to Environments ➜ [NAME OF ENVIRONMENT] ➜ Authentication ➜ Social Logins.

Click on the GitHub manage button.

Enter your GitHub Client ID, Client Secret, and Redirect URL. Then save and publish.

Step 4: Test GitHub Button

In your login screen, you should see a GitHub button that redirects to the GitHub OAuth Consent screen for login. Test it to make sure it works.


Set Who Can Login With GitHub

By default, only invited users can login with GitHub. If you want to allow new users to signup with GitHub, go to the Login Box builder and enable Allow Signups in the left panel.

Customizing Authentication Scopes for GitHub

Customizing Scopes for Google Social Login

Customizing Scopes for Github Social Login

Scopes let you specify exactly what type of information your application can fetch from your users after they grant it accessβ€” and the generated access token includes these approved scopes. Frontegg currently fetches a user profile and user email as default scopes when users authenticate via their Github account. You can add additional, custom scopes to your social login via your Frontegg portal. To do so, go to [Environment name] > Authentication > Social login > Custom > Scopes. You can check Github's supported scopes here.