Skip to main content

Get User Info

To get the information of the user, extracted from the ID token, you can call the userInfo method in the web3auth instance.

Method

userInfo(): State["userInfo"];

Usage

const userInfo = web3auth.userInfo()

UserInfo response

{
"aggregateVerifier": "tkey-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
}