API Reference:

TriaProvider:

Props:

PropertyTypeDescriptionDefault
didDomainstringsuffix for did name eg: mydid@tria‘@tria’
clientIdstringTria ClientID-
schemastringYour DApp schema for deeplinking‘tria’
authedScreenNamestringScreen name where you want Tria to redirect once authentication completes.‘dashboard’

uiConfig:

uiConfig property of TriaProvider allows you to alter how the Tria Auth Screens look in your DApp.

PropertyTypeDescriptionDefault
dappNamestringName of your dapp'My Dapp'
primaryColorstringprimary background color of the auth screens"rgb(128, 69, 255)”
headerTextstringHeader text for Login Screen'Get Started'
showHeaderbooleanShow header in auth modaltrue
showPoweredByTriabooleanShow 'Powered by Tria'true
googleButtonTextstringText for Google login button'Continue with Google'
twitterButtonTextstringText for Twitter login button'Continue with X'
discordButtonTextstringText for Discord login button'Continue with Discord'
appleButtonTextstringText for Apple login button'Continue with Apple'
showDividerbooleanShow divider in auth modaltrue
OtpHeaderstringHeader for OTP screen'Enter OTP'
OtpSubHeaderstringSub-header for OTP screen'Verify your account using 6-digit code sent to:'
OtpRetryCaptionstringText for OTP resend button'Resend'
usernameHeadingTextstringHeader for username creation screen'Create Tria name'
layoutstring[]Order of auth options['email-phone', 'divider', 'web2']
emailPhoneLoginMethodsstring[]Enabled email/phone login methods['email', 'phone']
web2LoginMethodsstring[]Enabled Web2 login methods['google', 'twitter', 'apple', 'discord']
tncPrecheckedbooleanTerms and Condition is already checked or not.true

config:

PropertyTypeDescriptionDefault
chainstringBlockchain network (e.g., 'FUSE', 'POLYGON')-
customChainobjectCustom chain configuration-
environment'testnet' | 'mainnet'Network environment'mainnet'
dappDetails{ dappDomain: string, dappLogo: string }Dapp-specific details-
aaobjectAccount Abstraction details-
aaSolanaobjectSolana Account Abstraction details-
rpcUrlstringCustom RPC URL-
triaStagingstring | booleanStaging environment flagfalse
supportedChainsstring[]List of supported chains[]
didDomainstringsuffix for did name eg: mydid@tria@tria

Was this page helpful?