Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Integration
1/3
Let your users easily login using their Twitch Account
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
2021.3.43f1
Compatible
Compatible
Compatible
Description

If you want to integrate your game with twitch, for example to use our Twitch PubSub & Chat Integration, this asset can help you to create an easy login function for your players so you do not need to send them to cryptically looking token generation sites.


Logging in with a twitch account into your game works just as with any website:

  1. Click the login button
  2. A browser window will be opebend
  3. Logging in to twitch (if not already logged in)
  4. Granting authorization by confirming the security question from twitch
  5. Browser can be closed
  6. Game is logged in

To achieve this, our asset supports three login methods:

A) Implicit Grant Flow

B) Authorization Code Flow (Local)

C) Server-Assisted Authorization Code Flow (recommended solution)

Please review the technical details regarding advantages and disadvantages of each method!


When letting the user log in, you can decide to force a re-authentication, which is useful for swichting accounts (Bot Account). Further you can eighter manually specify any required scopes by name, or you can pick one (or more) from our predefined scope sets for common things like chatbots.


Utilizing login methods B or C, this asset can maintain a valid token by refreshing it automatically when its expiring or when the game is restarted.

All Methods allow you to get basic information about who logged in (login name, userID) without manually talking to twitch's APIs. You can however use the token reeturned from our asset to request any information using a UnityWebRequest against twitch's API of course!


This asset, can be used in multiple instances, so you could for example login a streamer and his bot account in parallel. This requires some minor additional precautions (different game objects, port numbers, ...).


This asset does not support web platforms (WebGL). On a website, you should authenticate the user using your hosting website and pass the token to the game.

Technical details

A) Implicit Grant Flow

This allows for generating a temporary token.

Advantage: This is a secure implementation

Downside: It requires JavaScript support in the player's browser (what is commonly available)


B) Authorization Code Flow (Local)

The user authorizes your application to get a token and the application then requests that token form twitch.

Advantage: Tokens can be refreshed without user interaction

Downside: You must include the ClientSecret in your game - This is considered a bad practice and a security risk


C) Server-Assisted Authorization Code Flow (recommended solution)

Same as B but the secret is not added to the game, instead a small PHP-based script must be made available somewhere. (You can Re-implement the service in any language on your own)

Advantage: Same as B and the client secret is stored securely and only on your server

Disadvantage: You need to have a website, server or a cloud instance somewhere, where you can install the PHP-Script.


Want to know more? Visit our online documentation HERE


As always, the full source code is included with this asset so you can customize it if needed.


This asset does not support web platforms (WebGL)

Login With Twitch - Authentication made easy

(not enough ratings)
8 users have favourite this asset
(8)
$10.99
Seat
1
Updated price and taxes/VAT calculated at checkout
12 views in the past week
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR
Login With Twitch - Authentication made easy
$10.99