JWSError JWSInvalidSignature

Hi, I am getting an error when I try and create a new row in my supabase table. Error: "code":"PGRST301" "hint":NULL "message":"JWSError JWSInvalidSignature" "details":NULL I have setup a Create Row with Token node and I am using my service key as the token. Any reccomendation on what might be wrong here?
4 Replies
AI Support
AI Support4d ago
AI Support Bot Information
<@430452502861709332> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support4d ago
AI Response
The error you're encountering, "JWSError JWSInvalidSignature," suggests that there might be an issue with the JWT (JSON Web Token) signature verification process. Here are a few things you might want to check: 1. Token Validity: Ensure that the token you're using is valid and has not expired. Service keys and tokens can expire or become invalid due to policy changes. 2. Token Usage: Make sure that you are using the correct type of token. A service key is meant for server-side operations and might not be suitable for client-side operations, depending on how your Supabase setup is configured. 3. Signature: Verify that the signature of the JWT is correctly generated and matches the expected signature. The signing secret must be correct, and if you are manually constructing JWtokens, use a library to ensure they are constructed correctly. 4. Time Sync: JWTs have temporal constraints, so make sure that your system's time is properly synced to prevent token validity issues due to time discrepancies. If after checking these, the problem persists, it might be worth considering reaching out for a more detailed troubleshooting through your in-app support for direct assistance. For more information on JWT and solving related errors, you can look up Supabase's documentation or relevant resources.
BuildShip AI Support
Gaurav Chadha
Gaurav Chadha3d ago
Hi @Abhishek Sahni (Abhi) the error code - PGRST301 shows tht the JWT token you are using, probably the anon key with token is expired. You'll require to re-genrate one from supabase and use the new one.
Abhishek Sahni (Abhi)
Ahh, thank you Gaurav question, is this an issue with the service role or the JWT token? If it is the JWT token the recommended expiry duration is 60 mins how do I generate new tokens and pass it to the node everytime it runs?

Did you find this page helpful?