Login

Tonomy ID allows users to log in securely without passwords, eliminating credential phishing risks and reducing login friction. This is ideal for Web2 apps needing high-security authentication or privacy by default and Web3 apps requiring private key-based transaction authorization.

Before You Start

Ensure your app is registered with the Tonomynetwork (See Create Your App)

1. Configure network

Set your network at the start of your app (e.g., in App.tsx for React):

import { setSettings } from '@tonomy/tonomy-id-sdk';

//Mainnet Configuration
setSettings({
    ssoWebsiteOrigin: "https://accounts.testnet.tonomy.io",
    blockchainUrl: "https://pangea.eosusa.io",
    communicationUrl: "wss://communication.tonomy.io",
    currencySymbol: "TONO",
});

// Or use the Testnet Configuration
/*
setSettings({
    ssoWebsiteOrigin: "https://accounts.testnet.tonomy.io",
    blockchainUrl: "https://test.pangea.eosusa.io",
    communicationUrl: "wss://communication.testnet.tonomy.io",
    currencySymbol: "TONO",
});
*/

2. Open Login Flow

This will open the Tonomy ID app (via QR or deep link)

Request data sharing

Request user information by adding a dataRequest object.

3. Callback page

On your /callback page:

4. Persist User Session

Check user status when your app starts (e.g., in App.tsx):

Last updated