Twitch
In this tutorial, we will set up Twitch as an authentication provider for Conduit.
Create a Twitch App
- Login to your twitch account and go to the Twitch Developer Console and click on the Register Your Application button.
- Fill in the form and click on the Register button.
- On the next page, click on the Manage button.
- On the next page, click on the New Secret button.
- Copy the Client ID and Client Secret and save them for later.
Setting up the configuration
NOTE
Do not forget to configure the Twitch provider through the Admin Panel.
Go to the Authentication -> SIGN IN METHODS and select the Twitch provider.
Then, fill the required fields you obtained from the Twitch App.
Authenticate with Twitch
To begin authenticating with Twitch you request a redirect url with the proper scopes
Request
curl --location --request GET 'http://localhost:3000/authentication/init/twitch'
Response
{
"result": "https://id.twitch.tv/oauth2/authorize?client_id=CLIENT_ID&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauthentication%2Fcallback%2Ftwitch&response_type=code&scope=user:read:email"
}
Open a browser and navigate to the url returned to you from Conduit.
Now the /hook/authentication route has been triggered.
Once your browser has been redirected, your authentication has been completed.