Step By Step Guide For WordPress Single Sign On (SSO) using Twitch

If you want users to log in to your WordPress site using their Twitch credentials, you can simply do it using our WP OAuth Client plugin. Once you configure the Twitch with WordPress plugin, you can allow users to SSO to your WordPress site using Twitch. Similarly, you can map your WordPress roles based on your Twitch attributes/groups. To know more about other features we provide in WP OAuth Client plugin, you can click here.



You can download OAuth Client plugin using the following link.



Step 1: Follow the Step by Step guide to configure Twitch as an OAuth Server

  • First of all, go to https://passport.twitch.tv/disable_2fa/new and Login/Signup.
  • Go to https://dev.twitch.tv/console . Click on Applications ->Register Your Application .
  • Enter your Application name under the Name field.
  • Name
  • Enter the Redirect/Callback URI from miniOrange OAuth Client plugin/module under the OAuth Redirect URL field.
  • redirect
  • Select a Category.
  • Category
  • Click on Create button.
  • Create
  • Click on Manage.
  • Manage
  • Click on New Secret button.
  • Secret
  • Copy your Client ID and Client Secret and save it on your miniOrange OAuth Client plugin Configuration.
  • ClientSecret
  • You have successfully completed your Twitch Oauth Server side configurations.
  • Step 2: Twitch Subscription Mapping Add-on [Optional]

      a) Steps to configure the addon with OAuth client:

    • Go to the Twitch Subscription Mapping Add-on and enter your Channel ID and click on Save Settings.
    • OAuth/OpenID/OIDC Single Sign On (SSO), enter your channel id
    • While configuring your OAuth application for Twitch, enter the scope as user_subscriptions. Once you save the settings, click on Test Configuration. You will get the subscription plan of the user in the subscription attribute as shown in the image below.
    • OAuth/OpenID/OIDC Single Sign On (SSO), test configuration

      b) Find your Channel ID

    • Go to https://www.twitch.tv/ and login to your channel account. In your profile section click on Settings.
    • OAuth/OpenID/OIDC Single Sign On (SSO), login to your channel account
    • In the settings window click on Channel and Videos. It will open your channel settings in the creator dashboard.
    • OAuth/OpenID/OIDC Single Sign On (SSO), click on Channel and Videos
    • Here you can see the Primary Stream Key section and click on show.
    • OAuth/OpenID/OIDC Single Sign On (SSO),you can see the Primary Stream Key
    • Click on I Understand to reveal your stream key.
    • OAuth/OpenID/OIDC Single Sign On (SSO), click on understand button
    • Your stream key has the pattern live_<your channel id>_ <unique key>.
    • OAuth/OpenID/OIDC Single Sign On (SSO), key pattern
    • Once you get the stream key, copy the numerical channel id to save it in add-on.
    • NOTE - Channel ID doesn't change when you reset the Primary Stream Key. Resetting the stream key only changes the <unique key> value.
Twitch Endpoints and Scope:


Client ID : from the step 9 above
Client Secret : from the step 9 above
Scope: user:read:email
For more scopes click here.
Authorize Endpoint: https://id.twitch.tv/oauth2/authorize
Access Token Endpoint: https://id.twitch.tv/oauth2/token
Get User Info Endpoint: https://id.twitch.tv/oauth2/userinfo

Free Trial

If you are facing any difficulty please mail us on info@xecurify.com.