Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the fullstack TypeScript platform for developers and startup founders.

Join

support-community

show-and-tell

general

open-source

announcements

Filter context menu shortcuts not working

For example, if I right click a cell and select filter by > equals "<value>", the filter that's added is "equals null". Even if I select a different option from the context menu, such as greater than, the resulting filter is always "equals null".

How to store tree-like data?

I want to implement something like Git, where you have a tree-structure of revisions. - Every revision has a hash (it's id) - Every revision has a parent revision (null for the root) - Every revision may have children revisions (like branching) ...

Is there a way to use Password + Phone providers for authentication?

I have successfully implemented the Phone provider in my app, but after successful verification of the phone number I would like that a user can define a password for signing in to the app. So it would be a combination of a phone number + password. I know that Password provider can work together with an Email provider (i.e. Resend), which essentially accomplishes what I want to achieve, but it's using an email instead of a phone a channel. Any solution in this regard would be acceptable, so that a user doesn't need to verify an OTP via phone number would be acceptable....

How to obtain cookies in Convex Auth ConvexCredentials authorize?

Hi there, is it somehow possible to get the cookies inside ConvexCredentials authorize? I need to get them to verify the credentials. In NextAuth there is the req parameter in authorize. Your http actions have it as well. ```ts export const { auth, signIn, signOut, store } = convexAuth({ providers: [...

Encrypt organizations secrets

I'm using an external API, where I'm going to create a 1:1 relationship between the organizations in my database and the organizations created in the API. For each request in the external API, I need a secret key per organization for making requests. I need to store in my database the secret key for each organization, but I need to encrypt it. I was thinking of using Cryptr (npm), but reading the Convex documentation, I see that not all npm packages are accepted by convex. Any recommendations would be greatly appreciated....

Simulate Convex Auth Invalid

I've noticed that sometimes when my users leave my site open for a while, their convex auth session becomes invalid. This usually means when a user clicks on a button, the mutation throws an auth error. Is there some standard way to handle this type of issue? It would be nice if there was a way to wrap useMutation or useQuery in custom logic to redirect the user if an auth error gets returned from my api....

Convex Auth Question

Any clue if there is a way to change this oauth screen in google? right now it just shows the convex api url which is a bit off putting for users.
No description

Rejecting signin for unknown users when using magic link authorization (e.g. Resend)

I am using the Resend magic link w/ Convex Auth, which works fine, but I would like to prevent account creation for users that are not already registered in the database. I looked a bit into how Auth.js handles this. They provide a pre-signIn callback that you can use to reject signin attempts. However, this callback isn't exposed via Convex Auth....

How i can getcookie and setcookie in convex ?

I need to store a state of an application with the help of cookies

Onboarding Flow Clerk x Convex Multitenant

Hi everyone, I’m working on a multi-tenant app using Convex and Clerk. Currently, I have an onboarding flow that creates an organization in Clerk (which works fine). Once the organization is created, I then create a site entry in my database. For this process, I use the following code to get the current orgId: ```const identity = await ctx.auth.getUserIdentity();...

How to update the 'phoneVerified' field in authAccounts table after a successful phone verification?

I implemented the Twilio phone provider example as showed here: https://github.com/get-convex/convex-auth-example/blob/main/convex/otp/TwilioVerify.ts The phone number and later the code (OTP) verification is working without an issue and a user (if not existing) and also an account are successfully created. However I've noticed that in the authAccounts table, the phoneVerifiedremains to be set to unsetvalue, which of course it shouldn't be, because I made sure that the phone is verified....
No description

ts-api-spec no type safety

Hello guys, I am trying multiple repos. I have a simple "tasks"(same as example in docs) schema and function in project 1. I ran npx convex-helpers ts-api-spec, copied the code over to project 2 in api.ts But I am not getting any type safety when calling useQuery. ...

t.withIdentity with custom claims

We currently have some helper functions which check custom claims on the getUserIdentity object e.g. "orgId". Am I right in thinking that in convex-test (0.0.28) these custom claims currently aren't supported when using t.withIdentity?...

Issue with nodemailer

I am trying to send a email using nodemailer. I am using nodemailer to send emails for forget-password functionality. When I try to deploy my code to convex via "bun convex dev", I get a error "The package "stream" wasn't found on the file system but is built into node. Are you trying tobundle for node? You can use "platform: 'node'" to do that, which will remove this error." I don't understand where do i add "platform:node" ? I searched convex documentation, stackoverflow but couldn't find anything....

IdTokenExpired on using convexAuthNextjsToken in production

Error: {"code":"IdTokenExpired","message":"Expired: ID token expired at 2024-08-27 01:49:03 UTC (cur

Convex Monorepo Issue (react-dom native)

when ever i install "react-native-tab-view": "^3.5.2", my native apps break. i get the same error when i install other modules too. I don't see the connection between the packages i'm installing and the error. I haven’t touched any other part of the repo yet. ...
No description

`withOptimisticUpdate` with custom (auth) mutations

I have the following custom mutation: ```ts export function useAuthMutation<Mutation extends AuthFunction<"mutation">>( name: Mutation ) {...

Showing save status with optimistic update

Suppose we store the configuration of a grid in convex, and we want to use optimistic updates to show the grid layout updating instantly when users drag stuff around. How can we easily show whether their changes have been saved or not? One way to do it is to have a flag in the query output like isServerValue which is set to true on the convex query and false in the optimistic update... Does anyone have better ideas?...