Skip to main content

Get User Info

You can use the getUserInfo method to retrieve various details about the user, such as their login type, whether multi-factor authentication (MFA) is enabled, profile image, name, and other relevant information.

Usage

private void onLogin(Web3AuthResponse response)
{
var userInfo = response.userInfo;
Debug.Log("User Info: " + JsonUtility.ToJson(userInfo));
}

UserInfo Response

{
"aggregateVerifier": "w3a-google",
"email": "john@gmail.com",
"name": "John Dash",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"typeOfLogin": "google",
"verifier": "torus",
"verifierId": "john@gmail.com",
"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
"isMfaEnabled": true // returns true if user has enabled mfa
}