Boby
Boby13mo ago

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-creator
GitHub
GitHub - Boby900/thumbnail-creator
Contribute to Boby900/thumbnail-creator development by creating an account on GitHub.
No description
11 Replies
Michal Srb
Michal Srb13mo ago
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.
Boby
BobyOP13mo ago
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
Boby
BobyOP13mo ago
No description
lee
lee13mo ago
I think you should make sure the component calling the mutation is wrapped in a <Authenticated> as described here https://docs.convex.dev/auth/clerk
Convex Clerk | Convex Developer Hub
Clerk is an authentication platform providing login via
Michal Srb
Michal Srb13mo ago
@Boby have you followed the Step 2 in the guide? What have you found in the network tab?
Boby
BobyOP13mo ago
@Michal Srb
No description
No description
Boby
BobyOP13mo ago
this is what I am getting at Network tab
Michal Srb
Michal Srb13mo ago
@Boby have you followed the "Potential cause: You are not signed in" instructions? Did you try to log the token?
Boby
BobyOP13mo ago
when I am trying to log the token I am getting these below error @Michal Srb
No description
No description
Michal Srb
Michal Srb12mo ago
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
Boby
BobyOP12mo ago
thanks a lot @Michal Srb I had not added the JWT template in my Clerk, setting that up fixed it, thanks for helping me.

Did you find this page helpful?