Skip to main content

Twitch Social Login with Web3Auth

Twitch Login is a social login provider that allows users to sign in using their Twitch credentials. Web3Auth supports Twitch as a social login provider, allowing developers to offer a familiar and quick authentication method for users with Twitch accounts.

To integrate Twitch with Web3Auth, developers must first create a Twitch App via the Twitch Developer Portal.

Create a Twitch app

  1. Follow Twitch's registration instructions to (register your app)[https://dev.twitch.tv/console/apps/create].

  2. Paste the following as a Redirect URI into the "OAuth Redirect URLs" field.

    Twitch OAuth2.0 App Dashboard

  3. After creation of your Twitch app, click Manage

    Twitch OAuth2.0 App Manage

  4. Obtain the Client ID

    Twitch OAuth2.0 App Manage

Create a Twitch Connection

Enable on Dashboard

To use this feature, please enable Twitch from the Social Connections section in the Web3Auth Dashboard.

By default, Web3Auth uses its own pre-configured credentials for Twitch login.

Toggle Twitch Connection on Dashboard

Follow these steps to create a Twitch connection:

  1. Visit the Web3Auth Dashboard.
  2. Go to the Social Connections section.
  3. Click on the Settings icon near the Twitch connection.
  4. Enter the Auth Connection ID.
  5. Enter the Twitch Client ID.
  6. Finally, click on the Add Connection button.
Twitch Connection

Usage

Since, the Twitch Connection details are available from Dashboard, developers don't need to pass any additional parameters to the Web3AuthProvider.

Follow our Quickstart Guide to setup the basic flow.

Login with Twitch

await connectTo(WALLET_CONNECTORS.AUTH, {
authConnection: AUTH_CONNECTION.TWITCH,
authConnectionId: "w3a-twitch-demo",
});