Download the PHP package innocode-digital/wp-github-oauth without Composer
On this page you can find all versions of the php package innocode-digital/wp-github-oauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innocode-digital/wp-github-oauth
More information about innocode-digital/wp-github-oauth
Files in innocode-digital/wp-github-oauth
Package wp-github-oauth
Short Description Allows Single Sign On into WordPress through Github OAuth app with restriction by organization and team.
License GPL-2.0+
Informations about the package wp-github-oauth
Github OAuth
Description
Allows Single Sign On into WordPress through Github OAuth app with restriction by organization and team.
Install
-
Preferable way is to use Composer:
`
By default it will be installed as Must Use Plugin. But it's possible to control with
extra.installer-paths
incomposer.json
. -
Alternate way is to clone this repo to
wp-content/mu-plugins/
orwp-content/plugins/
:`
If plugin was installed as regular plugin then activate Github OAuth from Plugins page
or WP-CLI: wp plugin activate wp-github-oauth
.
Usage
Add required constants (usually to wp-config.php
):
`
IMPORTANT: keys in GITHUB_OAUTH_TEAMS2ROLES
are equal to roles (see
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
By default auth URL is using github
as an endpoint but it's possible to change with constant:
It's possible to change Github OAuth scope:
`
It's possible to change place where endpoint should be added:
`
To check if user used Github OAuth:
`
All versions of wp-github-oauth with dependencies
composer/installers Version ~1.0
knplabs/github-api Version ^2.12
league/oauth2-github Version ^2.0
php-http/guzzle6-adapter Version ^1.1