ConvexAuth error when shouldHandleCode is false
when trying to ignore the handle code for some path in my tanstack router app, the isLoading state from the useConvexAuth keep staying true. Don't know why this happened.
10 Replies
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!
Is the code you're ignoring related to auth? Sounds like when the code is ignored auth is being held up, but that's mostly a guess based on the description
I'm using Tanstack router and there's a _auth.tsx as a layout file for my /accounts path, and in the _auth.tsx will check whether isAuthenticated from the useConvexAuth, but even if i set the shouldHandleCode to false on the /accounts, everytime I add code param to the path, it would redirect me back to the /
Eg., it logs "here" (based on the code sample) but still redirects to root?
Yes
It seems like the code param still trigger the remove session or something that will make isaithenticated to false even with the shouldhandlecode to false
Can you try installing
@convex-dev/auth@alpha and see if that solves it
should be 0.0.90-alpha.0It works
Wow
what just happened
the 0.0.90-alpha.0 actually works
awesome - shouldHandleCode in the client had a bug in the conditional handling
will promote to 0.0.90, thanks for validating
Ic
Huge thanks for this @erquhart
Promoted to latest, 0.0.90