Realtime with custom JWT not working on Supabase platform

Hi! I am trying to set the credentials with supabase.auth.setAuth(token), and the subscriptions in realtime.subscription table vanish after a few seconds. In logs I found this: "Received an invalid access token from client: {:error, :unknown}" "Unknown connection authorization error: :error".

I use the flutter SDK and the jwt is signed using jwt secret and the payload contains all the required claims like for example { "supabase_uid": "1ed9dcf5-e383-4e41-820f-58df106c3e5c", "role": "authenticated", "aud": "authenticated", "app_metadata": {}, "user_metadata": {}, "iss": "my_supabase", "iat": 1663875937, "exp": 1663880737 }

I test my code on a self-hosted supabase and it works as expected.

Can anyone please tell me what can be done in this case?
Was this page helpful?