Michal Srb
Michal Srb
CCConvex Community
Created by Kenni on 11/20/2024 in #support-community
Handling "Too many reads" Error During Mass Deletion in Convex
7 replies
CCConvex Community
Created by ibrahimyaacob on 11/20/2024 in #support-community
[ents] filter by index with a field and order by "updatedAt" instead of "_creation_time"
Btw I fixed the types in 0.13.0, so the code that threw runtime exception no longer type checks.
15 replies
CCConvex Community
Created by 𝗠𝗜𝗖𝗞𝗘𝗬 on 11/23/2024 in #support-community
[Ents]: Ordering on Edge
If you want to filter a query of some documents by some field efficiently, the field must be inside those documents. In this case you are querying the users_to_events documents, but those don't have the start_date. Since we don't have support for storing additional data on the many:many edges (see recent #convex-ents discussion), you must model this manually, via two 1:many edges, and duplicate the start date on the relation. users -> attended 1:many attended -> events many:1 attended.startDate === event.startDate
5 replies
CCConvex Community
Created by Michal Srb on 10/31/2024 in #support-community
Text Search is hard to use
I was wrong on the second point - for the use cases I listed text search works great. What I am doing again, which I've done in the past, is removing diacritics in data and the needle like this: https://stackoverflow.com/a/37511463/1526986 That might be worth linking from Text Search docs as a recipe (with explanation of the indexing side).
7 replies
CCConvex Community
Created by Michal Srb on 10/31/2024 in #support-community
Text Search is hard to use
Perhaps better called useStaleValue
function useStableValue<T>(value: T) {
const ref = useRef(value);
if (value !== undefined) {
ref.current = value;
}
return { value: ref.current, isStale: value === undefined };
}
function useStableValue<T>(value: T) {
const ref = useRef(value);
if (value !== undefined) {
ref.current = value;
}
return { value: ref.current, isStale: value === undefined };
}
And here it is with a reset option, but that's kinda getting specific to the use-case scenario:
function useStableValue<T>(value: T, options: { reset: boolean }) {
const ref = useRef(value);
if (value !== undefined || options.reset) {
ref.current = value;
}
return { value: ref.current, isStale: value === undefined };
}
function useStableValue<T>(value: T, options: { reset: boolean }) {
const ref = useRef(value);
if (value !== undefined || options.reset) {
ref.current = value;
}
return { value: ref.current, isStale: value === undefined };
}
7 replies
CCConvex Community
Created by thedevstockgirl on 2/12/2024 in #support-community
Ability to pass additional data to auth context.
20 replies
CCConvex Community
Created by Sara on 8/24/2024 in #support-community
adding rate limits to existing auth functions (store, viewer ..etc)
We haven’t shipped the Anonymous support fully yet, but what you want is a captcha in the anonymous sign in flow.
4 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
Indeed right now you have to wait for isAuthenticated manually: https://github.com/get-convex/convex-auth/issues/29
15 replies
CCConvex Community
Created by erquhart on 8/22/2024 in #support-community
Convex Auth: a delete user method in useAuthActions (or somewhere)
2 replies
CCConvex Community
Created by Web Dev Cody on 8/19/2024 in #support-community
Question about Error
I think another option is to use a useQuery that doesn't throw but returns the error. convex-helpers have one such variant, and Tanstack Query is another option. I would probably not throw as the most straightforward solution. Since the record is deletable, I'd consider handling the deleted scenario as something the query should always do. Relying on the client never subscribing to the query in that state seems more fragile.
11 replies
CCConvex Community
Created by Delveroff on 8/4/2024 in #support-community
ConvexAuth+Next.js: should I implement `/api/sign-in`?
@hrutik_k please open a new thread with all details (what's not working for you, what's your setup)
55 replies
CCConvex Community
Created by Abdulramon Jemil on 8/22/2024 in #support-community
How OIDC with Convex Auth works with HTTP actions endpoints
We don't actually mount the /oauth/authorize and the Convex backend doesn't use it, so you can mount whatever logic you like at that route.
13 replies
CCConvex Community
Created by Abdulramon Jemil on 8/22/2024 in #support-community
How OIDC with Convex Auth works with HTTP actions endpoints
So that would mean that there are certain endpoints where I can't simply define http actions
Yeah, those endpoints are listed in the docs Sarah linked
13 replies
CCConvex Community
Created by Oren on 8/22/2024 in #support-community
how to use authRateLimits?
The rate limiting is automatic. Convex Auth rate limits all sign-ins where users provide email + (short) secret, so in OTP and Password flows. The library doesn't rate limit magic links (the code is long enough to not be bruteforceable) or OAuth. You can configure the rate limit via this option: https://labs.convex.dev/auth/api_reference/server#signinmaxfailedattempsperhour
3 replies
CCConvex Community
Created by Bhanu Prakash on 8/20/2024 in #support-community
Is there anything similar like ConvexAuthNextjsServerProvider for Remix?
We fixed the useLayoutEffect warning in latest @convex-dev/auth and convex
7 replies
CCConvex Community
Created by cameronm on 8/21/2024 in #support-community
Convex Auth user table fields
Indeed
12 replies
CCConvex Community
Created by cameronm on 8/21/2024 in #support-community
Convex Auth user table fields
12 replies
CCConvex Community
Created by cameronm on 8/21/2024 in #support-community
Convex Auth user table fields
Then you'd want role to be returned by your profile callback.
12 replies
CCConvex Community
Created by cameronm on 8/21/2024 in #support-community
Convex Auth user table fields
Unset fields are not returned. You can do v.union(v.null(), something) if you want nulls.
12 replies
CCConvex Community
Created by cameronm on 8/21/2024 in #support-community
Convex Auth user table fields
Sounds like you're never setting role. What authentication methods are you using?
12 replies