Custom jwt auth: any working example?
I'm trying to make a sample nextjs app working with custom JWT auth, but it doesn't work.
Latest behavior: convex auth loops, continuously refetching the JWT. I'm trying to read the source code of the convex client, but it's very time consuming.
My repro repo: https://github.com/antoineol/convex-jwt/tree/loop-refetch
I created a github issue: https://github.com/get-convex/convex-js/issues/108 , but I don't know where the issue is. My general idea is that I guess there is a special (undocumented) requirement about how
useProviderXAuth should behave, but I can't get which one.Any working repo showcasing custom JWT auth, or any idea of what could be wrong would be very appreciated.
---
Context: my company has a ruby on rails app (+ devise auth + postgres) for which I'd like to progressively migrate pages to a nextjs + convex app, keeping a good user experience in navigation, preserving the session.
It works great (including data sync), except the auth.
I ended up doing a minimal repo to find out how JWT auth should work.
