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.

28802880

🚧

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.

21502150

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.

16241624

📘

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.

22502250

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

17501750

Step 3: Enter Credentials In Frontegg

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

Click on the GitHub manage button.

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

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.

14401440

📘

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.


Did this page help you?