convex auth token outside React component
In a React component, we use useAuthToken to get a token, but how could we get such token in just a plain TS file?
I'm trying to upload data but it says Property 'store' does not exist on type 'StorageWriter'
How can I upload stuff?
I'm reading this https://docs.convex.dev/file-storage/store-files but the .store does not exists
"convex": "^1.17.2",
```ts
...
ConvexAuthNextjsServerProvider not exported
From the docs for NextJS (https://labs.convex.dev/auth/setup):
Wrap your app in ConvexAuthNextjsServerProvider from @convex-dev/auth/nextjs/server
But
ConvexAuthNextjsServerProvider
is not exported from @convex/auth
package in v0.0.74. Means that a bunch of the NextJS steps including, I presume, middleware are not achievable as the docs say?...Convex Auth on the server?
I'm using Convex Auth, Convex Ents, and TanStack Start.
I want to be able to take advantage of the
beforeLoad
method of each route to redirect unauthenticated users as it's wasteful and prone to security leaks if I rely sole on the Authenticated and Unathenticated components as people have been suggesting here.
Now I get that sessions are managed in localstorage, and it's a tall order to validate that on the server (wouldn't be a problem if you used cookies instead), but is there a plan to be able to let us get the auth status of a user on the server? There's already a way to use Convex calls on the server, so surely there's a way to check if a user is authenticated or not?...How do i deploy backend?
I followed https://docs.convex.dev/production/hosting/ and tried both vercel and netlify, but it only deploys the frontend ive got all of the env keys correct and it still does not work
How to use convex in a big team/monorepo
Let’s say I’ve got a relatively large project with my team of let’s say 15 devs. This project consists of multiple frontend apps and multiple “services”. The model I’ve been working with for some time is an NX integrated monorepo (ie shared package.json) with NestJs micro services (graphql or grpc). Chuck pulumi or sst in there to deploy each deploy target.
Now the upside of this model is that you can establish unique deployment targets for each service and frontend, seperate databases by concern/domain and scale each part of the project independently. With local development you can have each developer using local db instances to test new schemas in isolation (ie not impacting the work of other devs).
The downside of this model is that wire up is incredibly cumbersome and time consuming, the number of integrations needed to support realtime, file storage etc.. is time consuming, and get full end to end type safety is nothing short of a burden....
dashboard log performance
Its gotten a bit more noticeable lately, well now unbearably slow on my laptop so and its specs are Xeon E-2186M with 32gb of ram with chrome.
INP is consistently like 2000~
On my main linux desktop, INP is between 50-500ms but LCP is also 3s~, so i do get delays. But its a 9950x so probably 8x the speed of the laptop...
Upgrade from 1.17.0 to 1.17.2: Error: Could not find Convex client!
I upgraded my project that had no errors whatsoever from 1.17.0 to 1.17.2 and now get this error:
``
Error occurred prerendering page "/sign-in". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Could not find Convex client!
ConvexQueryCacheProvider must be used in the React component tree under
ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app...[Ents]: Ordering on Edge
Hello all,
I have a question which in short is whether (or rather how) it's possible to order the query of many:many edges on the other end of the edge using convex-ents.
I have user ents which can "attend" events ents - i.e. many:many relationship. I want to query the events a single user is attending and in the same query order the retrieved events based on the start date of the events (in the db as a
string
, like 2025-01-24T12:30:00.000+01:00) as follows:...Convex Auth session keeps dying
if I leave a session idle, after some time auth breaks with this log
Failed to authenticate: "Expired: ID token expired at 2024-11-21 23:57:07 UTC (current time is 2024-11-22 00:00:10.832851202 UTC)", check your server auth config
I have jwt session duration set to 7 days (while I don't implement automatic Google re-auth)
isn't it supposed to make the session live longer?...pagination and TanStack Start
In https://docs.convex.dev/client/react/tanstack-start
Using Convex React hooks Convex React hooks like usePaginatedQuery can be used alongside TanStack hooks. These hooks reference the same Convex Client so there's still just one set of consistent query results in your app when these are combined.Is the code below the correct use of the usePaginatedQuery hook with TanStack Start?...
Type error on internal query
Hey there. Beginner developer here, hoping to get help with the following type error on line 3. I don't understand why TypeScript thinks the return type is self-referential.
```TypeScript...handler
implicitly has return typeany
because it does not have a return type annotation and is referenced directly or indirectly in one of its expressions. ts(7023)
Contribution
I want to learn how to contribute to convex. Is there any way for onboarding? Can anyone help me?
Custom JWT token for authentication
Hi, I have a question: Can we issue a JWT token directly in Convex and use it for authentication, without relying on any third-party authentication provider? I couldn’t find any documentation related to this.
Tanstack Start + Convex Quickstart
import { Body, Head, Html, Meta, Scripts } from "@tanstack/start";
Im getting errors trying on this part and not able to import css...
Google OAuth redirect issue
Trying to get oauth with Google to work. When I login it shows me the google accounts, I pick one and click continue but after logging in I end up back at the sign in page and there is no session. I followed everything here - https://labs.convex.dev/auth/setup. Any idea how to debug this?
Issue with convex being picked up by `npx tsc` in expo project
Hello, was hoping some typescript wizard could help me out here. I've been trying to configure my repos tsconfig to not clash with the tsconfig.json in our convex/ folder.
The problem
Whenever i run
npx tsc
to check for any typescript compile errors from the root of my repo, it picks up on some files in my projects from the convex/
and says there are errors.
...1.17.1 all functions exported from _generated/server now have "any" type for ctx and args
After upgrading to 1.17.1, it seems that all the function types exported from _generated/server types are missing. Did the api change?
