Getting Started

Torus streamlines all DApp login processes, and allows users log in to your DApp with Google OAuth Login accounts without the need for any complicated tools.

Install Torus

Integrating Torus with your DApp is as seamless as using it. Let us start by first installing Torus onto your DApp website.

Integrate Torus onto your Website via Script Tag

The code snippet below sets Torus as the default login method for the DApp, paste the following script to the <body> of index.html.

Torus embed script


Install Torus with a NPM Package

You can install via a npm package.

Once included, users would then be prompted to log in with their Google Account.

Test Torus with your DApp

Test if Torus works with your DApp with the code snippet from below:

// Start using web3 in your dapp
$ web3.eth.accounts[0]
> "0x05B53A73B...150C005e21"

Torus is now Integrated with your DApp

Your DApp is set, users can now seamlessly log in to your DApp with their Google OAuth logins. More OAuth login capabilities will be added in the near future.

Adding the Dynamics of Web3 to Your DApp

Integrating with Torus gives you a Web3 instance to play with, read more on Web3's Documentation. You can implement web3 functionalities just like you would with Metamask.