When I leave my app open for long periods, I soon get "Could not verify token claim" using Clerk.
I haven't deployed a prod version yet, so I only see this in developement, and I am using Clerk for auth.
I can see what is going on here, but I cannot figure out why. The
aud
claim in the token disappears from the tokens that Clerk gives me. This takes so long time to happen, so I am having a tough time debugging (1hour+). When I decode an earlier jwt, the aud=convex
claim is there, but when I see this error, the latest jwts are missing that aud
claim and I see the "Could not verify token claim" error. Does anyone else see this? It basically happens when I leave my developement app tab open in my browser for > 1hour (just a guess at this point) without using it.3 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!
Refreshing the app in the tab, or opening the app in a new tab does not fix the problem. I have to restart the development app to make the error not come back.
Missing aud is pretty odd - that would be Clerk's end as they issue the tokens and you set the audience in the Clerk dashboard. I'd reach out in their Discord.