For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Get user info

Use the useWeb3AuthUser hook to read the signed-in user's profile. The hook loads userInfo when the user connects and clears it when the user disconnects.

Usage​

import { useWeb3AuthUser } from '@web3auth/react-native-sdk'
import { Image, Text, View } from 'react-native'

function UserProfile() {
const { userInfo, isMFAEnabled } = useWeb3AuthUser()

if (!userInfo) return null

return (
<View>
{userInfo.profileImage && (
<Image
source={{ uri: userInfo.profileImage }}
style={{ width: 64, height: 64, borderRadius: 32 }}
/>
)}
<Text>Name: {userInfo.name}</Text>
<Text>Email: {userInfo.email}</Text>
<Text>Signed in with: {userInfo.authConnection}</Text>
<Text>MFA enabled: {isMFAEnabled ? 'Yes' : 'No'}</Text>
</View>
)
}

See useWeb3AuthUser for all userInfo fields.

On this page