Skip to main content

getUserInfo

Function to retrieve information about the connected user.

note

This function will only return information based on the connected adapter. These details are not stored anywhere and are fetched from the adapter during the connection and remain in the session.

Usage

// After successful login
const userInfo = await web3auth.getUserInfo();
console.log(userInfo);

Return Type

PropertyTypeDescription
emailstringEmail of the user.
namestringName of the user.
profileImagestringProfile image of the user.
aggregateVerifierstringAggregate verifier of the user.
verifierstringVerifier of the user.
verifierIdstringVerifier ID of the user.
typeOfLoginstringType of login provider.
dappSharestringDapp share of the user.
idTokenstringToken issued by Web3Auth.
oAuthIdTokenstringToken issued by OAuth provider. Will be available only if you are using custom verifiers.
oAuthAccessTokenstringAccess Token issued by OAuth provider. Will be available only if you are using custom verifiers.
appStatestringApp state of the user.
touchIDPreferencestringTouch ID preference of the user.
isMfaEnabledbooleanWhether Multi Factor Authentication is enabled for the user.

Sample Response

{
"email": "john@gmail.com",
"name": "John Dash",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"aggregateVerifier": "tkey-google-lrc",
"verifier": "torus",
"verifierId": "john@gmail.com",
"typeOfLogin": "google",
"dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers
"idToken": "<jwtToken issued by Web3Auth>",
"oAuthIdToken": "<jwtToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
"oAuthAccessToken": "<accessToken issued by OAuth Provider>" // will be sent only incase of custom verifiers
}