Manage User Entity

Managing the current user


0xPass provides a simple way to authenticate and manage any information tied to the current user.

The useUser hook provides all contextual information on the user:

import { useUser } from "0xpass"
// in your code...
const { user } = useUser()
//you can later access user identities as follows
<p> User's Twitter Username: {user.twitter.screen_name} </p>

User object is ONLY created for authenticated or verified users. These are users that Sign In With Ethereum. The user object is null for unauthenticated users.


For authenticated users, the following properties and identities can be accessed when they are linked:

  • - internal 0xPass ID for the user
  • user.createdAt - time of account creation
  • user.wallets - list of user's wallets
  • - user's Google account details
  • user.twitter - user's Twitter account details
  • user.farcaster - user's Farcaster account details
  • Support for additional identities such as phone, email, github, twitch, discord, etc are being added

To view all the accounts and identities currently linked to a user, you can use user.identities. For example, that could represent a list as follows:

  • user.identities: ["google", "farcaster"]

User Object (Example)

  "id": "63ef6587-88de-4678-933e-a924c6746640",
  "createdAt": "2023-03-19T23:19:42.564Z",
  "identities": ["twitter", "github"],
  "twitter": {
    "description": "Co-founder @ Om Labs (@0xpass_io) | ex-uber",
    "name": "Keon Kim",
    "nickname": "Keon Kim",
    "picture": "",
    "screen_name": "0xkkeon"
  "github": {
    "bio": "Co-founder @ 0xPass,\r\nex-Uber",
    "email": "[email protected]",
    "location": "San Francisco",
    "name": "Keon",
    "nickname": "keon",
    "picture": "",
    "email_verified": true