Copy the redirect URI
In the Authdog console, select the project and environment, open Authentication > Providers, find Twitch, and click Enable. Copy the redirect URI shown in the form:
https://identity.authdog.com/api/v1/callback/<connectionId>Register the Twitch application
- Open the Twitch Developer Console and select Register Your Application. Two-factor authentication must be enabled on the account first.
- Name the application, names are globally unique on Twitch.
- Under OAuth Redirect URLs, add the redirect URI from Authdog. Several are allowed.
- Pick a category and create the application.
- Open Manage and copy the Client ID, then select New Secret and copy the value.
Configure Authdog
| Field | Value |
|---|---|
| Client ID | From the application's Manage page |
| Client Secret | Shown once when generated |
Save, then toggle the connection active.
What Twitch returns
Authdog requests user:read:email and reads the profile from https://api.twitch.tv/helix/users, the numeric user ID, login name, display name, avatar, and the account's email address.
Login names change when a streamer rebrands; the numeric ID does not, and that is what Authdog links on. Store the display name for presentation, never as a key.
Twitch's Helix API requires the client ID on every profile request alongside the access token, which Authdog handles as part of the exchange. A client secret regenerated on Twitch invalidates the one stored in Authdog immediately, update the connection in the same sitting.
Test it
- Open your environment's hosted sign-in page, or link to
https://identity.authdog.com/api/v1/signin/<connectionId>. - Select the Twitch button and authorize.
- Confirm the user appears under Users with an email address attached.
Troubleshooting
| Symptom | Cause |
|---|---|
redirect_uri does not match registered URI |
The URI is missing from OAuth Redirect URLs |
invalid client secret |
The secret was regenerated after being copied into Authdog |
| Missing email on the profile | The user:read:email scope was not granted |
| Cannot register the application | Two-factor authentication is not enabled on the Twitch account |
Related
| Read | To learn how to |
|---|---|
| Connectors | Set up any other social provider |
| Discord | Add the community identity most Twitch audiences also use |