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

UFUNCTION()
void AYourGameMode::OnWeb3AuthLoginSuccess(const FString& PrivateKey, const FString& PublicAddress)
{
// Get user info from the login success callback
FString UserInfo = UWeb3AuthSDK::GetInstance()->GetUserInfo();
UE_LOG(LogTemp, Warning, TEXT("User Info: %s"), *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 in case of custom verifiers
"idToken": "<JWT token issued by Web3Auth>",
"oAuthIdToken": "< JWT token issued by OAuth provider>", // will be sent only in case of custom verifiers
"oAuthAccessToken": "<Access token issued by OAuth provider>", // will be sent only in case of custom verifiers
"isMfaEnabled": true // returns true if user has enabled MFA
}