© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
Deleted User

Realtime with custom JWT not working on Supabase platform

Hi! I am trying to set the credentials with
supabase.auth.setAuth(token)
supabase.auth.setAuth(token)
, and the subscriptions in
realtime.subscription
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"
"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 }
{ "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?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Realtime not working with Custom Jwt with RLS
SupabaseSSupabase / help-and-questions
3mo ago
supabase realtime INSERT and UPDATE not working?
SupabaseSSupabase / help-and-questions
4y ago
Custom JWT (ES256) works with Realtime but fails on Storage API
SupabaseSSupabase / help-and-questions
7mo ago
realtime with v2 not working
SupabaseSSupabase / help-and-questions
4y ago