Auth0 with convex in vanilla js PWA.
Hello.
I am trying to wire up convex with auth0 in a vanilla js progressive web app.
Docs seem to only cover this for a react app, and I am having trouble getting this to work in vanilla js pwa.
I have added
auth.config.ts
file with my Auth0 provider (specifying domain and applicationID).
Auth through Auth0 works fine, as I am able to get logged in. In my convex query I added the following check:
However the identity in the code above is always null, even though the user is logged in.
What am I missing?
Thanks in advance.1 Reply
Which client SDK are you using?
ConvexClient
has a setAuth
function which you need to call with a fetcher for the Auth0 token: