wiki-grav/plugins/login-oauth2-extras/vendor/vertisan/oauth2-twitch-helix
2023-06-26 13:40:26 +02:00
..
src (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
tests (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
.gitignore (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
.travis.yml (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
composer.json (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
LICENCE (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
phpunit.xml (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00
README.md (Grav GitSync) Automatic Commit from exu 2023-06-26 13:40:26 +02:00

Twitch Helix Provider for OAuth 2.0 Client

Build Status Latest Stable Version License

This package provides Twitch (new version Helix) OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use Composer:

composer require vertisan/oauth2-twitch-helix

Usage

Usage is the same as The League's OAuth client, using Vertisan\OAuth2\Client\Provider\TwitchHelix as the provider.

$provider = new \Vertisan\OAuth2\Client\Provider\TwitchHelix([
    'clientId' => "YOUR_CLIENT_ID",
    'clientSecret' => "YOUR_CLIENT_SECRET",
    'redirectUri' => "http://your-redirect-uri-passed-in-twitch-dashboard",
]);

You can also optionally add a scopes key to the array passed to the constructor. The available scopes are documented on the New Twitch API Reference.

Testing

$ ./vendor/bin/phpunit