Comment on page
Implementing Social Logins To WebGL Builds
How to import and use social logins with WebGL builds.
Some developers feel that having social logins (e.g. Google, Facebook, Twitter, GitHub, Discord) would be a much better entrance system for users getting into the blockchain space. Some users tend to feel more comfortable having a wallet tied to a social account they already own. This helps to speed up onboarding and reduces friction when it comes to gaining new users. With a click of a button they can authorize an account and be on their way!
The Torus Wallet powered by Web3Auth is a browser-enabled web wallet that seamlessly integrates into WebGL builds. Below, we’ll walk you through the wallet, how to integrate it, as well as how to use it with the web3.unity SDK.
Torus is simple to setup and very easy to use. It allows you to login via social networks with only 1-click of a button. Through the use of various social accounts, you’re able to connect and authenticate users into your game quite easily!
Once logged in, you'll be presented with a very clean looking dashboard where you can see your balance, activity and various things that any user needs to manage their blockchain usage.
Using this wallet in WebGL builds is very simple! All you need to do is visit the
index.jsfile in WebGLTemplates -> Web3 -> Index.js. Uncomment the
Once the config is set, you can press
Ctrl + bfrom Unity to create a local build and test things out. Upon using the WebGL login scene, you'll be greeted with a pop-up allowing you to select the Torus Wallet as a form of authentication. You can see an example of this on our amazing chicken demo
This is extremely easy as the Torus Wallet integrates perfectly with our SDK. You can test a transaction out by walking to any of the functions and giving them a click. You'll see a little pop up asking you to authorize the transaction like so. Just press accept and watch the magic happen!
Yes! it's really that easy! We hope you enjoy having such an amazing wallet at your finger tips. We hope you develop something great and we're proud to be integrated with these amazing teams. Keep learning and happy coding!