Part of the Social ecosystem · 70 projects
This module allows users to register and log in to your Drupal site using their GitHub account. It facilitates authentication and can be configured to request specific permissions from GitHub services.
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
- Log in as an admin.
- 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
- Log in to a GitHub account.
- Navigate to Settings » Developer settings » OAuth Apps.
- Click New OAuth App
- Set the Application name, Homepage URL, and Application description as desired.
- Paste the redirect URI value (from Step 2) in the Authorization callback URL field.
- Click Register application.
- On the new application page click Generate a new client secret.
- Copy the new secret key (GitHUb will not show it again!) and Client IDand save them somewhere safe.
In Drupal
- Return to Configuration » User authentication » GitHub
- Enter the GitHub client ID in the Client ID field.
- Enter the GitHub secret key in the Client secret field.
- Click Save configuration.
- 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.
Ask your assistant about Social Auth GitHub
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
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.
More in the Social ecosystem
Most installed first