Not able to use mutation
when I am trying to submit the form, it throws an error that
You must be logged in
Though I am already logged in, I am using the Clerk for my authentication.
You can see at the top in the below image that my profile pic is visible "I am logged in".
Because of this, I am not able to create data.
TIA
https://github.com/Boby900/thumbnail-creatorGitHub
GitHub - Boby900/thumbnail-creator
Contribute to Boby900/thumbnail-creator development by creating an account on GitHub.

11 Replies
Hey @Boby, your setup looks good to me, please follow this guide to unblock yourself:
https://docs.convex.dev/auth/debug
Debugging Authentication | Convex Developer Hub
You have followed one of our authentication guides but something is not working.
thanks for getting back to me @Michal Srb , I will let you know if I will be able to debug it
I have added
console.log("server identity", await ctx.auth.getUserIdentity());
it's giving me server identity
null but now I am not able to debug it further
I think you should make sure the component calling the mutation is wrapped in a
<Authenticated>
as described here https://docs.convex.dev/auth/clerkConvex Clerk | Convex Developer Hub
Clerk is an authentication platform providing login via
@Boby have you followed the Step 2 in the guide? What have you found in the network tab?
@Michal Srb


this is what I am getting at Network tab
@Boby have you followed the "Potential cause: You are not signed in" instructions? Did you try to log the token?
when I am trying to log the token I am getting these below error @Michal Srb


Looks like you don't have the JWT template named "convex" set up in your Clerk instance from which you copied the publishable key.
See the step 3 in the setup guide:
https://docs.convex.dev/auth/clerk
Convex Clerk | Convex Developer Hub
Clerk is an authentication platform providing login via
thanks a lot @Michal Srb I had not added the JWT template in my Clerk, setting that up fixed it, thanks for helping me.