PHPackages                             innocode-digital/wp-github-oauth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. innocode-digital/wp-github-oauth

AbandonedArchivedWordpress-muplugin[Authentication &amp; Authorization](/categories/authentication)

innocode-digital/wp-github-oauth
================================

Allows Single Sign On into WordPress through Github OAuth app with restriction by organization and team.

1.2.3(6y ago)06.0kGPL-2.0+PHPPHP &gt;=7.1

Since Dec 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/innocode-digital/wp-github-oauth)[ Packagist](https://packagist.org/packages/innocode-digital/wp-github-oauth)[ RSS](/packages/innocode-digital-wp-github-oauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Github OAuth
============

[](#github-oauth)

### Description

[](#description)

Allows Single Sign On into WordPress through [Github OAuth](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/)app with restriction by [organization](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-organizations)and [team](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams).

### Install

[](#install)

- Preferable way is to use [Composer](https://getcomposer.org/):

    ```
    composer require innocode-digital/wp-github-oauth

    ```

    By default it will be installed as [Must Use Plugin](https://codex.wordpress.org/Must_Use_Plugins). But it's possible to control with `extra.installer-paths` in `composer.json`.
- Alternate way is to clone this repo to `wp-content/mu-plugins/` or `wp-content/plugins/`:

    ```
    cd wp-content/plugins/
    git clone git@github.com:innocode-digital/wp-github-oauth.git
    cd wp-github-oauth/
    composer install

    ```

If plugin was installed as regular plugin then activate **Github OAuth** from Plugins page or [WP-CLI](https://make.wordpress.org/cli/handbook/): `wp plugin activate wp-github-oauth`.

### Usage

[](#usage)

Add required constants (usually to `wp-config.php`):

```
define( 'GITHUB_OAUTH_CLIENT_ID', '' );
define( 'GITHUB_OAUTH_CLIENT_SECRET', '' );
define( 'GITHUB_OAUTH_ORGANIZATION', 123456 ); // Organization ID
define( 'GITHUB_OAUTH_TEAMS2ROLES', [
    'super_admin'   => [
        123456, 234567,
    ], // Applicable to Multisite, will be the same as 'administrator' for single sites
    'administrator' => [
        345678,
    ],
    'editor'        => [
        456789, 567890, 654321,
    ],
] );

```

**IMPORTANT**: keys in `GITHUB_OAUTH_TEAMS2ROLES` are equal to roles (see [Roles and Capabilities](https://wordpress.org/support/article/roles-and-capabilities/)) and should be in descendant order by capability since first match will be used in case when user is in different teams.

### Documentation

[](#documentation)

By default auth URL is using `github` as an endpoint but it's possible to change with constant:

```
define( 'INNOCODE_GITHUB_OAUTH_ENDPOINT', '' );

```

---

It's possible to change [Github OAuth scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/):

```
add_filter( 'innocode_github_oauth_scope', function ( array $scope ) {
    return $scope; // Default is array containing 'user:email' and 'read:org'.
} );

```

---

It's possible to change place where endpoint should be added:

```
add_filter( 'innocode_github_oauth_endpoint_mask', function ( $mask, $endpoint ) {
    return $mask; // Default is EP_ROOT constant.
}, 10, 2 );

```

To check if user used Github OAuth:

```
innocode_github_oauth()->is_identified( $user_id );

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

2356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b52f801a1cdb5f6622a9e49f4359717b1808ca23e948a243eae225f55e2c7eb?d=identicon)[smfb-dinamo](/maintainers/smfb-dinamo)

---

Top Contributors

[![kuliebiakin](https://avatars.githubusercontent.com/u/6066592?v=4)](https://github.com/kuliebiakin "kuliebiakin (9 commits)")

### Embed Badge

![Health badge](/badges/innocode-digital-wp-github-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/innocode-digital-wp-github-oauth/health.svg)](https://phpackages.com/packages/innocode-digital-wp-github-oauth)
```

###  Alternatives

[markstory/acl_extras

Additional tools for managing DB ACL in CakePHP applications.

155311.0k](/packages/markstory-acl-extras)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)[stuttter/wp-user-signups

The best way to manage user &amp; site sign-ups in WordPress

46208.9k5](/packages/stuttter-wp-user-signups)[winter/wn-user-plugin

User plugin for Winter CMS

1233.5k13](/packages/winter-wn-user-plugin)[rainlab/userplus-plugin

User plus plugin for October CMS

168.8k2](/packages/rainlab-userplus-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
