ctx.auth.getUserIdentity() returning undefined in webhook
here is the code:
export const webhookHandler = httpAction(async (ctx, request) => {
const body = await request.json();
const { target, installation } = body;
const userId = await getUserId(ctx);
if (userId === undefined) {
throw new ConvexError('User must be logged in.');
}
switch (target) {
case 'created':
await handleInstallationCreated(ctx, installation);
}
return new Response(
Webhook Recieved, {status: 200
});
});

