Local mode error on requesting data : JWSError JWSInvalidSignature

I have set up supabase locally with docker compose and everything works well
I am able to login and singup to the application

but when I try to insert a record into a table, I get this error.

I am using the anon JWT token that I have generated myself and it works for authentication, but not for SQL requests.

Any ideas on the issue, or for a possible fix ?
(Related issues on the web did not help me)

I have read that you can run supabase status to get the token used, but since I'm using docker compose, I don't see where I should run this command.

Any help would be greatly appreciated !

curl 'http://localhost:8000/rest/v1/profiles?select=*' \
  -H 'Accept: */*' \
  -H 'Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Origin: http://localhost:4200' \
  -H 'Referer: http://localhost:4200/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
  -H 'apikey: VALID_APIKEY' \
  -H 'authorization: Bearer VALID_TOKEN' \
  -H 'content-profile: public' \
  -H 'content-type: application/json' \
  -H 'prefer: return=representation' \
  -H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'x-client-info: supabase-js-web/2.43.5' \
  --data-raw '{"username":"my_username","birthday":"2006-06-26"}'

{
    "code": "PGRST301",
    "details": null,
    "hint": null,
    "message": "JWSError JWSInvalidSignature"
}
Was this page helpful?