Dan MercerD
Convex Community3y ago
8 replies
Dan Mercer

Storing users in Convex

What is the recommended way to create a user in a Convex table corresponding to each user from my IDP? I was doing this
      convex.setAuth(idToken);
      const createUser = convex.mutation('user/create');
      createUser()
        .then((convexUser) => {
          setConvexUser(convexUser);
        });

but I'm upgrading Convex and now it wants an async getIdToken function instead, and it seems the mutation does not wait for that token process to resolve, so I get an authentication error.
Was this page helpful?