To enable your users to login with GitHub, you are required to first register an application with GitHub to serve as the OAuth provider. You may also want to create a GitHub Organization to manage your project.
Follow the steps to below to configure GitHub login.
On your GitHub account, navigate to your
Organization Account Settings.
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.
Now that your application is created, you should be redirected to the application configuration screen.
Client secrets, click on
Generate a new client secret and save the generated secret.
Go to Authentication ➜ Settings ➜ Social Logins, click on the GitHub Login configure button and enter your Google Client ID, Client Secret, and Redirect URL.
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 Authentication ➜ Settings ➜ Authentication flow and enable Allow Signups.
Updated about 2 months ago