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
using Newtonsoft.Json;
private void onLogin(Web3AuthResponse response)
{
var userInfo = response.userInfo;
Debug.Log("User Info: " + JsonConvert.SerializeObject(userInfo));
}
You can also retrieve the user information from the active session:
var userInfo = web3Auth.getUserInfo();
UserInfo response
{
"groupedAuthConnectionId": "grouped-google",
"authConnectionId": "google",
"authConnection": "google",
"userId": "john@gmail.com",
"email": "john@gmail.com",
"name": "John Dash",
"profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
"dappShare": "<DAPP_SHARE>",
"idToken": "<jwtToken issued by Web3Auth>",
"oAuthIdToken": "<jwtToken issued by OAuth Provider>",
"oAuthAccessToken": "<accessToken issued by OAuth Provider>",
"isMfaEnabled": true
}