Skip to content
Extra providers for Login OAuth2 Plugin
Branch: develop
Clone or download
Latest commit 1c81216 Apr 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
classes/Providers Added Twitch provider Apr 28, 2019
css Added Twitch provider Apr 28, 2019
media Added Twitch provider Apr 28, 2019
templates/login-oauth2/providers Added Twitch provider Apr 28, 2019
vendor
CHANGELOG.md prepare for release Apr 28, 2019
LICENSE initial commit Apr 25, 2019
README.md Added Twitch provider Apr 28, 2019
blueprints.yaml prepare for release Apr 28, 2019
composer.json Added Twitch provider Apr 28, 2019
composer.lock
login-oauth2-extras.php Added GitLab + Blueprints Apr 26, 2019
login-oauth2-extras.yaml Added Twitch provider Apr 28, 2019

README.md

Login Login OAuth2 Extras Plugin

The Login Login OAuth2 Extras Plugin is for Grav CMS. This plugin provides extra authenticatoin providers not included in the Login OAuth2 Plugin.

Currently the plugin supports the following providers:

If you wish to add a new provider, please open a pull request against this repo.

Installation

Installing the Login Login OAuth2 Extras plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's terminal (also called the command line). From the root of your Grav install type:

bin/gpm install login-oauth2-extras

This will install the Login Login OAuth2 Extras plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/login-oauth2-extras.

Configuration

Before configuring this plugin, you should copy the user/plugins/login-oauth2-extras/login-oauth2-extras.yaml to user/config/plugins/login-oauth2-extras.yaml and only edit that copy.

Here is the default configuration and an explanation of available options:

enabled: true
built_in_css: true
providers:
  gitlab:
    enabled: false
    client_id: ''
    client_secret: ''
    domain:
    options:
      scope: ['read_user', 'openid']
  discord:
    enabled: false
    client_id: ''
    client_secret: ''
    options:
      scope: ['identify', 'email']
  slack:
    enabled: false
    client_id: ''
    client_secret: ''
    options:
      scope: ['users:read', 'users:read.email']
  jira:
    enabled: false
    client_id: ''
    client_secret: ''
    options:
      scope: ['read:jira-user']
  twitch:
    enabled: false
    client_id: ''
    client_secret: ''
    options:
      scope: ['user_read']

admin:
  enabled: true
  built_in_css: true
  providers:
    gitlab:
      enabled: false
      client_id: ''
      client_secret: ''
      domain:
      options:
        scope: ['read_user', 'openid']
    discord:
      enabled: false
      client_id: ''
      client_secret: ''
      options:
        scope: ['identify', 'email']
    slack:
      enabled: false
      client_id: ''
      client_secret: ''
      options:
        scope: ['users:read', 'users:read.email']
    jira:
      enabled: false
      client_id: ''
      client_secret: ''
      options:
        scope: ['read:jira-user']
    twitch:
      enabled: false
      client_id: ''
      client_secret: ''
      options:
        scope: ['user_read']

Note that if you use the admin plugin, a file with your configuration, and named login-oauth2-extras.yaml will be saved in the user/config/plugins/ folder once the configuration is saved in the admin.

OAuth2 Providers

GitLab

Key Description Values
enabled Enable or disable this specific provider. This stops its showing as an valid login option [default: true] | false
client_id The Client ID Provided by GitLab when you register an application for OAuth2 authentication <string>
client_secret The Client Secret Provided by GitLab when you register an application for OAuth2 authentication <string>
domain A custom GitLab domain <string>
scope An array of strings that define the OAuth2 scope. These can enable retrieving more data, but often require more permissions e.g. ['read_user', 'openid']

Discord

Key Description Values
enabled Enable or disable this specific provider. This stops its showing as an valid login option [default: true] | false
client_id The Client ID Provided by Discord when you register an application for OAuth2 authentication <string>
client_secret The Client Secret Provided by Discord when you register an application for OAuth2 authentication <string>
scope An array of strings that define the OAuth2 scope. These can enable retrieving more data, but often require more permissions e.g. ['identify', 'email']

Slack

Key Description Values
enabled Enable or disable this specific provider. This stops its showing as an valid login option [default: true] | false
client_id The Client ID Provided by Slack when you register an application for OAuth2 authentication <string>
client_secret The Client Secret Provided by Slack when you register an application for OAuth2 authentication <string>
scope An array of strings that define the OAuth2 scope. These can enable retrieving more data, but often require more permissions e.g. ['users:read', 'users:read.email']

Jira

Key Description Values
enabled Enable or disable this specific provider. This stops its showing as an valid login option [default: true] | false
client_id The Client ID Provided by Jira when you register an application for OAuth2 authentication <string>
client_secret The Client Secret Provided by Jira when you register an application for OAuth2 authentication <string>
scope An array of strings that define the OAuth2 scope. These can enable retrieving more data, but often require more permissions e.g. ['read:jira-user']

Twitch

Key Description Values
enabled Enable or disable this specific provider. This stops its showing as an valid login option [default: true] | false
client_id The Client ID Provided by Twitch when you register an application for OAuth2 authentication <string>
client_secret The Client Secret Provided by Twitch when you register an application for OAuth2 authentication <string>
scope An array of strings that define the OAuth2 scope. These can enable retrieving more data, but often require more permissions e.g. ['user_read']
You can’t perform that action at this time.