Oren
Oren
CCConvex Community
Created by Oren on 9/11/2024 in #support-community
Uncaught Error: Invalid state
No description
1 replies
CCConvex Community
Created by Oren on 9/1/2024 in #support-community
convex auth causes browser "leave site?" prompt on every redirect e.g. stripe or auth
No description
8 replies
CCConvex Community
Created by Oren on 8/23/2024 in #support-community
how to handle auth errors
Hey I'm trying to show an error to user when auth fails for example when their magic link is expired with auth.js / nextauth I could add error page specified with url param of the error and display it there but how can we handle it with convex auth?
2 replies
CCConvex Community
Created by Oren on 8/22/2024 in #support-community
how to use authRateLimits?
I see auth schema has authRateLimits defined and its in docs but not much info available on how to ratelimit the auth e.g. magic emails
3 replies
CCConvex Community
Created by Oren on 8/21/2024 in #support-community
sentry errors
No description
10 replies
CCConvex Community
Created by Oren on 8/17/2024 in #support-community
How to use rate limit with convex auth
I have my auth setup with http-email and I would like to rate limit it but it seems like not possible right now. I do use rate limiting for other mutations successfully second question is how to use rate-limiting in actions?
{
id: "http-email",
name: "Email",
type: "email",
maxAge: 60 * 60 * 24,
sendVerificationRequest: async ({ identifier, url }) => {
///..my email sending logic I want to rate limit
}
},
{
id: "http-email",
name: "Email",
type: "email",
maxAge: 60 * 60 * 24,
sendVerificationRequest: async ({ identifier, url }) => {
///..my email sending logic I want to rate limit
}
},
4 replies
CCConvex Community
Created by Oren on 8/16/2024 in #support-community
action is not available to runAction / app / typescript
No description
15 replies
CCConvex Community
Created by Oren on 8/16/2024 in #support-community
http action as webhook is not working
json {"code":"[Request ID: c3a345772419092f] Server Error: Uncaught TypeError: Request URL is undefined","trace":"Uncaught TypeError: Request URL is undefined\n at <anonymous> (../../convex/renders.ts:137:22)\n at async invokeFunction (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/impl/registration_impl.ts:79:11)\n at async invokeHttpAction (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/impl/registration_impl.ts:422:0)\n at async HttpRouter.runRequest (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/router.ts:322:16)\n"}
json {"code":"[Request ID: c3a345772419092f] Server Error: Uncaught TypeError: Request URL is undefined","trace":"Uncaught TypeError: Request URL is undefined\n at <anonymous> (../../convex/renders.ts:137:22)\n at async invokeFunction (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/impl/registration_impl.ts:79:11)\n at async invokeHttpAction (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/impl/registration_impl.ts:422:0)\n at async HttpRouter.runRequest (../../node_modules/.pnpm/convex@1.14.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/convex/src/server/router.ts:322:16)\n"}
11 replies
CCConvex Community
Created by Oren on 8/15/2024 in #support-community
How to get user details in server component
How can I get user details with convex auth on nextjs server component? I have a query that works when used in client side with useQuery but it doesn't work with fetchQuery
15 replies
CCConvex Community
Created by Oren on 8/15/2024 in #support-community
auth docs are misleading
https://labs.convex.dev/auth/setup says run npm create convex@latest -> next.js -> convex auth but only options are clerk and none
3 replies
CCConvex Community
Created by Oren on 8/4/2024 in #support-community
using zod schema for validation
import { z } from "zod";
import { NoOp } from "convex-helpers/server/customFunctions";
import { zCustomMutation } from "convex-helpers/server/zod";
import { mutation } from "./_generated/server";

const zMutation = zCustomMutation(mutation, NoOp);

export const emailFormSchema = z.object({
email: z.string().email(),
});

export const add = zMutation({
args: emailFormSchema,
handler: async (ctx, args) => {
await ctx.db.insert("emails", { email: args.email });
},
});
import { z } from "zod";
import { NoOp } from "convex-helpers/server/customFunctions";
import { zCustomMutation } from "convex-helpers/server/zod";
import { mutation } from "./_generated/server";

const zMutation = zCustomMutation(mutation, NoOp);

export const emailFormSchema = z.object({
email: z.string().email(),
});

export const add = zMutation({
args: emailFormSchema,
handler: async (ctx, args) => {
await ctx.db.insert("emails", { email: args.email });
},
});
I want to use the zod schema directly like above emailFormSchema but its giving me error; Type 'ZodObject<{ email: ZodString; }, "strip", ZodTypeAny, { email: string; }, { email: string; }>' is not assignable to type 'void | ZodValidator | undefined'.
16 replies