Getting a Convex ID with getUserIdentity
Hey guys can I add id field in getUserIdentity?
2 Replies
You can’t add fields to the UserIdentity object returned by
getUserIdentity()
. If you’re trying to assign a convex id to the user, the general approach is to make a users table and keep it synced with your auth provider, example in the docs: https://docs.convex.dev/auth/database-authStoring Users in the Convex Database | Convex Developer Hub
You might want to have a centralized place that stores information about the
If you meant a different kind of id, you'll still want to take this approach and store the id and any other user data that you want to track in a table.