This project is part of the Drupal Social Initiative and is based on the Social API.

Social Auth GitHub allows users to register and login to your Drupal site with their GitHub account. The module allows websites to request any scopes, so any tasks requiring authentication with GitHub services can be performed. It is based on Social Auth and Social API projects

Configuration

In Drupal

  1. Log in as an admin.
  2. Navigate to Configuration » User authentication » GitHub and copy the Authorized redirect URI field value (the URL should end in /user/login/github/callback).

In GitHub

  1. Log in to a GitHub account.
  2. Navigate to Settings » Developer settings » OAuth Apps.
  3. Click New OAuth App
  4. Set the Application name, Homepage URL, and Application description as desired.
  5. Paste the redirect URI value (from Step 2) in the Authorization callback URL field.
  6. Click Register application.
  7. On the new application page click Generate a new client secret.
  8. Copy the new secret key (GitHUb will not show it again!) and Client IDand save them somewhere safe.

In Drupal

  1. Return to Configuration » User authentication » GitHub
  2. Enter the GitHub client ID in the Client ID field.
  3. Enter the GitHub secret key in the Client secret field.
  4. Click Save configuration.
  5. Navigate to Structure » Block Layout and place a Social Auth login block somewhere on the site (if not already placed).

That's it! Log in with a GitHub account to test the implementation.

How it works

The user can click on the GitHub logo in the Social Auth Login block.
You can also add a button or link anywhere on the site that points
to /user/login/github, so theming and customizing the button or link
is very flexible.

After GitHub has returned the user to your site, the module compares the
user id or email address provided by GitHub. If the user has previously
registered using GitHub or your site already has an account with the same
email address, the user is logged in. If not, a new user account is created.
Also, a GitHub account can be associated with an authenticated user.

Supporting organizations: 

Project information

Releases