Vue
useUserData()
API Documentation
Backend Services
- Authentication
- Storage
GraphQL
- AI
Client Libraries
- JavaScript
- React
- Next.js
- Vue
- NhostClient
- useAccessToken()
- useAuthenticated()
- useAuthenticationStatus()
- useChangeEmail()
- useChangePassword()
- useDecodedAccessToken()
- useFileUpload()
- useFileUploadItem()
- useHasuraClaim()
- useHasuraClaims()
- useMultipleFilesUpload()
- useNhostClient()
- useProviderLink()
- useResetPassword()
- useSendVerificationEmail()
- useSignInAnonymous()
- useSignInEmailPassword()
- useSignInEmailPasswordless()
- useSignInPAT()
- useSignInSmsPasswordless()
- useSignOut()
- useSignUpEmailPassword()
- useUserAvatarUrl()
- useUserData()
- useUserDefaultRole()
- useUserDisplayName()
- useUserEmail()
- useUserId()
- useUserIsAnonymous()
- useUserLocale()
- useUserRoles()
- useAddSecurityKey()
- useElevateSecurityKeyEmail()
- useSignInEmailSecurityKey()
- useSignUpEmailSecurityKey()
- useSignInEmailOTP()
- useSignInIdToken()
- useLinkIdToken()
- React Native
Vue
useUserData()
Use the composable useUserData
to get the user data of the user.
const userData = useUserData()
Examples
const userData = useUserData()
Example of user data
{
"avatarUrl": "https://s.gravatar.com/avatar",
"createdAt": "2022-04-11T16:33:14.780439+00:00",
"defaultRole": "user",
"displayName": "John Doe",
"email": "john@nhost.io",
"id": "05e054c7-a722-42e7-90a6-3f77a2f118c8",
"isAnonymous": false,
"locale": "en",
"metadata": {
"lastName": "Doe",
"firstName": "John"
},
"roles": ["user", "me"]
}
On this page