Table of contents
How to enable Twitch login in WordPress
1. Create a Twitch App
To be able to log in via Twitch you must create a Twitch App first.
- Open the Twitch Developer Console and login with your Twitch account.
- To create a Twitch App your account both needs:
- to be verified
- and to have the Two Factor Authentication enabled. If it is not enabled already, you can enable it at your Settings page on the Security and Privacy tab
- Navigate to the Applications tab.
- Click on the “+ Register Your Application” button on the right side.
- Enter a “Name” for your App.
- Into the “OAuth Redirect URLs” field you should enter the URL that Nextend Social Login suggests at the backend.
- Select the “Website Integration” option in the “Category” list.
- Complete the human verification test.
- Press the “Create” button.
- On the “Applications” tab, find your app and click “Manage“.
- To generate a “Client Secret“, click on the “New Secret” button.
- Copy the “Client ID” and the “Client Secret” values. These will be needed in the plugin’s settings.
2. App setup
Once your Twitch app is ready you’ll need to copy and paste the Client ID and Client Secret to the Twitch provider’s Settings tab. You can find the information at your Twitch app’s Applications tab.
Once your Client ID and Client Secret has been added you need to verify the setup first. This verification helps you identify possible problems with the app.
The Client ID of your Twitch app. You can find it as it is described in the App setup guide.
The Client Secret of your Twitch app. You can find it as it is described in the App setup guide.
Force reauthorization on each login
When enabled, the users will be asked to reauthorize the Twitch App each time they login with Twitch.
Username prefix on Register
Whenever a new user registers with a Twitch account they can get a custom prefix so you can easily identify them.
Fallback username prefix on register
Whenever a new user registers with a Twitch account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.
Terms and conditions
This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with Twitch. For more information please read our GDPR documentation.
By default Nextend Social Login stores the first name, last name, email, avatar url and access token if it is possible, however some additional information can also be retrieved and stored.
When an option is checked, that field will be stored in a meta key with the specified name.
It determines when the synchronization shall happen.
- Register: whenever a new user registers with a provider, their data will be retrieved and stored.
- Login: whenever user logs in with a provider, their data will be retrieved and stored.
- Link: whenever user links and existing WordPress account with a provider, their data will be retrieved and stored.
User login name
Stores the user’s Twitch login name.
Stores the user’s Twitch account type name. The returned value can be either “staff”, “admin”, “global_mod”, or empty. If it is empty, we won’t create an unnecessary meta record.
Stores the user’s broadcaster type: The returned value can be either “partner”, “affiliate”, or empty. If it is empty, we won’t create an unnecessary meta record.
Stores the user’s channel description.
Stores the date when the user’s Twitch account was created.
Common error messages returned by Twitch during verification
The problem is that the entered Client ID is not correct, maybe the app with the entered Client ID was deleted. Check the 12th step of the App setup to fix the problem.
invalid client secret
Error: 403 – invalid client secret
The Client Secret that you copied from the Twitch app is invalid. Make sure the correct one was copied. Check the 11th and 12th steps of the App setup to fix the problem.
The popup stays open with your website in it
You are about to leave Twitch.
Twitch has no control over the content or security of https://example.com.
The problem is that the entered “OAuth Redirect URLs” field is not correct for your app. Check the 6th step of the App setup to fix the problem.