Alex123
Alex123
CCConvex Community
Created by Alex123 on 4/29/2024 in #support-community
Store user mutation in production
The functions fails to find the stored user
10 replies
CCConvex Community
Created by Alex123 on 4/29/2024 in #support-community
Store user mutation in production
Yes. The user exists in the dashboard. I invoked a webhook intergrated with clerk
10 replies
CCConvex Community
Created by Alex123 on 4/29/2024 in #support-community
Store user mutation in production
Uncaught Error: No user found is what am getting in at prod. During local development it works just fine
10 replies
CCConvex Community
Created by Alex123 on 4/29/2024 in #support-community
Store user mutation in production
export const storeUser = mutation({ args: { firebaseUserId: v.string(), }, handler: async (ctx, args) => { const identity = await ctx.auth.getUserIdentity(); if (!identity) { throw new Error('Unauthenticated'); } // check if user is already stored const user = await ctx.db .query('users') .withIndex('by_token_identifier', (q) => q.eq('tokenIdentifier', identity.tokenIdentifier) ) .unique(); if (user === null) { throw new Error('No user found'); } const userId = await ctx.db.patch(user._id, { email: identity.email, firebaseUserId: args.firebaseUserId, }); return userId; }, });
10 replies
CCConvex Community
Created by Alex123 on 4/29/2024 in #support-community
Store user mutation in production
this is the function. the user is already stored in the db after sign up through webhook call. I'm trying to update the user table and add a firebase uuid
10 replies