Figloalds
Figloalds23h ago

Getting "No auth provider found matching the given token" with Convex Password Auth

I'm running basic Svelte Kit + Convex Dev locally, I have configured environment variables in my convex dev deployment and I'm even getting what seems to be a valid JWT token out of signIn action Since I'm not using Next and Svelte doesn't have a more automatic token store/retrieve/refresh mechanism yet, I set up the fetchTokens function as instructed in the site (and even though it isn't as automatic, it still seems pretty straightforward to configure, props for gud API design); However, with all that when the API calls it's Authenticate passing the token I got from login, I get a "No auth provider found matching the given token" error and then the websocket literally dies and stops retrying and the refresh token api call never resolves or rejects Anyone have any light to shed?
No description
No description
No description
No description
No description
17 Replies
Figloalds
FigloaldsOP22h ago
For added context, I'm running the Convex Backend on Docker; If I remove these lines and let npx convex dev spin up it's own standalone server, then it works for the most part, except when renewing tokens that have expired (the signIn action for renewing never resolves or rejects and the ws connection dies)
No description
Barrel Of Lube
Barrel Of Lube21h ago
what does ur signin action function look like?
Figloalds
FigloaldsOP21h ago
It's imported from Convex Auth
No description
Barrel Of Lube
Barrel Of Lube21h ago
you need to specify the provider with the actions react has helper functions
const { signIn } = useAuthActions();
...
<Button
key={provider}
onClick={() => {
console.log("Signing in with", provider);
signIn(provider); // provider is a string
toast.success(`Signing in with ${provider}`);
}}
>
const { signIn } = useAuthActions();
...
<Button
key={provider}
onClick={() => {
console.log("Signing in with", provider);
signIn(provider); // provider is a string
toast.success(`Signing in with ${provider}`);
}}
>
Figloalds
FigloaldsOP21h ago
yes it works for logging in, it gives me a JWT token and it seems valid, but then when it fails to authenticate the token it generated
No description
Barrel Of Lube
Barrel Of Lube21h ago
thats weird
Figloalds
FigloaldsOP21h ago
this behavior occurs when using self-hosted on Docker
No description
Barrel Of Lube
Barrel Of Lube21h ago
lemme check on my codebase, i need to see the types ye am also on self hosted docker
Figloalds
FigloaldsOP21h ago
the Authentication in the deployment seems right, the issuer looks right too
Barrel Of Lube
Barrel Of Lube21h ago
bro u need to send the provider
Barrel Of Lube
Barrel Of Lube21h ago
No description
Barrel Of Lube
Barrel Of Lube21h ago
set provider to "password"
Figloalds
FigloaldsOP21h ago
No description
Figloalds
FigloaldsOP21h ago
the provider is being sent, the login is being made, but it fails to authenticate the token it generated
Barrel Of Lube
Barrel Of Lube21h ago
hmm
Figloalds
FigloaldsOP21h ago
I found the code that throws this error message, it should pass
No description
Barrel Of Lube
Barrel Of Lube21h ago
ig wait for a dev to respond, convex auth has always been a bit iffy w/password flow, i recommend either using clerk or better auth, convex team is working on an official better auth integration current one is either maintained by better auth / community idk

Did you find this page helpful?