CustomAuth Android Samples

Examples of using Torus CustomAuth Android SDK.


  1. Clone the repository and open with Android Studio

  2. Run the app, you’ll see a demo app demonstrating full functionalities
    of Torus CustomAuth Android SDK

  • OAuth/Social logins

  • Aggregate logins returning same keys for different providers

  • Native/custom logins using getTorusKey and getAggregateTorusKey

  1. All configurations are written to res/values/strings.yml, update the values accordingly to try
    with your specific configurations.


Native Google Sign-In sometimes return the same ID token even if we already
called revokeAccess and signOut
, Torus Nodes will always reject token previously used to authenticate to avoid one node can
reconstruct the user’s key.

To make sure that Google Android Sign-In always succeed, makes sure to store the user’s key in
secure local storage and only call getTorusKey if native Google Sign-In returns a different token.


View Github