Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Social Auth GitHub

Security covered Drupal 9–11

Part of the Social ecosystem · 37 projects

View on drupal.org

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.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
May 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Active

Releases

Version Type Core Release date
4.0.1 Stable 9–11 Sep 4, 2024
4.0.0 Stable May 3, 2023