Convex Community

CC

Convex Community

Join the community to ask questions about Convex Community and get answers from other members.

Join

support-community

show-and-tell

general

self-hosted

announcements

how do add authentication providers to production settings in Convex

I deployed my dev app, including convex functions into prod. The app uses convex-auth for authentication. In looking at the Convex Dashboard settings, I see that I don't have any settings for my authentication configuration. How can I set this up?

SOLVED: User error (Was: Strange PROD behavior with validation)

I am seeing some strange behavior in my prod environment: ``` Jan 18, 22:46:30 failure ...
No description

query optimization & recommendation please

I’m using Convex for a project and need some advice on optimizing queries, especially for dashboard metrics. Currently, I have to query the entire dataset before performing operations, which could become inefficient as the dataset grows. Could you recommend strategies or best practices for improving query performance, particularly when calculating dashboard metrics? Additionally, any insights on structuring schemas and defining indexes for large datasets would be appreciated. ```...

Convex Auth with Expo and Native Apple and Google Sign In

Hello, I am currently following the documentation for using Convex Auth with Expo. However, the documentation provides an example to sign up with the in app web-browser when used with Apple or Google Sign In. Although I get why it's done that way, as Convex Auth is in an early stage and still in beta, but displaying a webview to sign in with Apple/Google in an app is not the perfect experience for users. I would like to use Convex Auth but with expo-apple-authentication and @react-native-google-signin/google-signin that allows to provide native experience sign-in. ...

getting type of query

+page.svelte
const accounts = useQuery(api.accounts.list, {});
const accounts = useQuery(api.accounts.list, {});
component...

How to migrate personal deployment to another Convex team and project?

In my Convex plan, I have reached my seat max for teammates in my Convex team. We have a project with this max count of developers. My company just brought in a new colleague. If I remove a pre-existing teammate, Alice, from my Convex team, and then add Bob, the new colleague, to the Convex team, then what happens to Alice's non-production deployment? ...

Retrieve Authenticate User ConvexAuth

I got some issue to retrieve the logged In user. or when I console.log(isAuthenticated) I got true
No description

convex auth nextjs middleware removes "code" query param. Conflicts with third party oauth integrati

Convex auth nextjs middleware removes the "code" query param by default which conflicts with third party integration. In my case, calendly. Their oauth 2 process returns a code param appended to my redirect uri but the convex nextjs middleware delete it and therefore I can't complete flow. Is there a way to prefix this with convex (convexCode) instead? Or another solution to avoid conflicts?...

Convex Auth workflow

I'm converting from Remix/ReactRouter7 and Supabase to TanStack Start and Convex. I have this working in the other app and I'm having trouble knowing what to put where in "TanVex" or "ConStack" 🙂 Step 1 - User puts their email in a form for a Magic Link auth (which I have working on its own), and clicks the button. Step 2 - I need convex to take the submitted email address, query my "people" table and check if (a) the email exists/is connected to a user and (b) the "can_login" boolean for the user is set to true. Here is how I'm capturing the email address and sending it to the query:...

Is it possible to listen for subscribe/unsubscribe events for queries and trigger an action?

For example, for a convex query like api.messages.list, I want to be able to query the users who are listening to it at that time. I can update the lastOnline value for each user periodically and track it with this, but this will cause an absurd number of function calls. Since the client connects to the backend via websocket, this information is actually available in the backend. But I couldn't find how to access it and trigger an action in case of disconnect.

Type Mismatch in Update Mutation with Optional Fields

I’m running into a type mismatch issue when updating an account using a mutation. Simplified version of my setup: schema.ts ```ts export const account = v.object({ name: v.string(),...

DELETE_MISSING_KEY error on aggregate.trigger() on trigger (convex helper)

im trying to create a count aggregations on an existing table. i manage to run the migration as per below ```ts export const backfillAggregatesMigration = migrations.define({...
No description

Uncaught ConvexError: InvalidCursor: Tried to run a query starting from a cursor, but it looks like

Im working on aggregation backfill and i ran it on the first time and it works, but on the 2nd run after i updated the aggregate code (keys & sort keys). I ran into this error.
No description

ConvexAuth - Nextjs - Reset OTP - Password reset

why do I have on my dev server thos log of convex regarding my reset otp and password reset ? Each action on my app I got those logs
No description

Apply generated document id to a non-system field in schema

Hey all! I'm evaluating convex along with a few other services. The promises of convex are very exciting and what drew my attention to it. But I'm getting hung up on the inability to control document schema completely. Here's what I'm trying to do: ```tags: defineTable({ id: v.id("tags"),...

How do I navigate to a foreign key's document?

Seems inconvenient now to click a foreign key and navigate to its parent table. I used to be able to see an arrow in the top right corner. Then that got replaced with a hotkey, like shift + G. Now that hotkey is gone and I don't see an option at all in the selection menu....
No description

Should I avoid this ent query?

This is an example from ents docs: ```ts export const listTeamInvites = query({ args: { teamId: v.id("teams") },...

Using actions in queries and mutations

What is best practice for calling actions that "use node" inside of queries - e.g. fetching data from 3rd party nodejs clients and using that data in return from a convex query? Seems can only call actions using scheduler, but then how can 3rd party data be used in queries / mutations directly?

Error: Convex functions should not be imported in the browser.

My convex server looks like this: ``` 'use node'; import { v } from 'convex/values'; import { action } from '../../_generated/server';...