JWSInvalidSignature error on Create/Update operations
Hi all, hope you guys can help me out with this issue. I previously experienced the same issues as seen in this thread: https://github.com/supabase/supabase/issues/17164. After installing the latest updates, I am now able to call my APIs, but i still get stuck with the same
Some extra context:
on "public"."UserPetFood"
as permissive
for select
to public
using (true);
create policy "insert into UserPetFood based on matching user wallet_address"
on "public"."UserPetFood"
as permissive
for insert
to anon
with check ((EXISTS ( SELECT 1
FROM "UserPet" up
WHERE ((up.id = "UserPetFood".user_pet_id) AND (up.wallet_address = (auth.jwt() ->> 'wallet_address'::text))))));`
{"code":"PGRST301","details":null,"hint":null,"message":"JWSError JWSInvalidSignature"} error whenever I need to execute some kind of update or insert. It does not error out when it's a query for reading. Some extra context:
- My database migrations include the following policies which work fine on the remote:
`create policy "update UserPet based on matching user wallet_address"
on "public"."UserPetFood"
as permissive
for update
to anon
using (((auth.jwt() ->> 'wallet_address'::text) = wallet_address))
with check (((auth.jwt() ->> 'wallet_address'::text) = wallet_address));
on "public"."UserPetFood"
as permissive
for select
to public
using (true);
create policy "insert into UserPetFood based on matching user wallet_address"
on "public"."UserPetFood"
as permissive
for insert
to anon
with check ((EXISTS ( SELECT 1
FROM "UserPet" up
WHERE ((up.id = "UserPetFood".user_pet_id) AND (up.wallet_address = (auth.jwt() ->> 'wallet_address'::text))))));`
- When I run the database migrations locally, I see on Supabase studio that no RLS policies have actually been applied to the tables. All other migrations appear to have run fine.
- When I try to manually add a policy (in this case, template for read access for all users), i get this error as seen in the attachments.

message.txt7.92KB
GitHub
The open source Firebase alternative. Contribute to supabase/supabase development by creating an account on GitHub.