Publisher | Firesplash Entertainment |
---|---|
File size | 1.16MB |
Number of files | 15 |
Latest version | 1 |
Latest release date | 2022-08-04 12:35:15 |
First release date | 2022-08-04 12:35:15 |
Supported Unity versions | 2018.4.2 or higher |
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:
- Click the login button
- A browser window will be opebend
- Logging in to twitch (if not already logged in)
- Granting authorization by confirming the security question from twitch
- Browser can be closed
- 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)