NlaakALD
NlaakALD•3mo ago

Convex Log Error "auth:store Invalid Refresh Token"

I have used the Convex Documentation & Tutorials / Code. Also use the Github Example Repository. It seems like it IS working on first page load and the Sign In. But somewhere in the Convex Backend code I lose the user. I have been stuck on this for 3 days. Looks like I have to go into the Convex Auth Package code to debug/fix - or I am missing something? Here are the related files, Convex Logs and Broswer Console Logs.
10 Replies
Convex Bot
Convex Bot•3mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
NlaakALD
NlaakALDOP•3mo ago
Au, Here is improved logging (client enabled)
No description
NlaakALD
NlaakALDOP•3mo ago
This looks like an issue within the auth manager having to do with Token Versions (V1 & V2)?
sshader
sshader•3mo ago
What version of Convex Auth are you using / can you try upgrading to the latest? There are some issues we've been trying to fix specifically around Next.js App Router with SSA (not sure if you're doing that or another Next.js setup)
NlaakALD
NlaakALDOP•3mo ago
"@auth/core": "^0.35.0",
"@convex-dev/auth": "^0.0.67", "convex": "^1.16.2"
"@auth/core": "^0.35.0",
"@convex-dev/auth": "^0.0.67", "convex": "^1.16.2"
sshader
sshader•3mo ago
Yeah curious if you have the same issues on @convex-dev/auth 0.0.71 (just to rule out other things). You can also get slightly more logging from the backend functions here: https://labs.convex.dev/auth/debugging which can sometimes be useful for debugging
Debugging - Convex Auth
Authentication library for your Convex backend
NlaakALD
NlaakALDOP•3mo ago
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!, {
verbose: process.env.NODE_ENV === 'development',
});
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!, {
verbose: process.env.NODE_ENV === 'development',
});
Yeah, i have it enabled now when developing, off for production let me try 0.71
NlaakALD
NlaakALDOP•3mo ago
You nailed it! Did not realize there was a newer version already.
No description
NlaakALD
NlaakALDOP•3mo ago
Can mark as solved Cause, Error behind keyboard 🙂
sshader
sshader•3mo ago
Let us know if you hit other issues later! Also in addition to the client verbose logs, I wanted to point out that you can set up verbose logs for your Convex Auth functions via an environment variable (they show up in the Convex dashboard) and also for any Next.js middleware (they show up in your Next server logs)

Did you find this page helpful?