Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(realtime_client, supabase): pass apikey as the initial access token for realtime client #596

Merged
merged 2 commits into from Aug 22, 2023

Conversation

dshukertjr
Copy link
Member

What kind of change does this PR introduce?

Realtime server expects the anon key to be sent with the heart beat for unauthenticated users, but currently null is being sent. This PR sets the anon key as the initial value of accessToken for RealtimeClient so that unauthenticated client will send the anon key to realtime server .

Related supabase/realtime-js#245

@@ -159,6 +159,7 @@ class SupabaseAuth with WidgetsBindingObserver {

@override
void didChangeAppLifecycleState(AppLifecycleState state) {
// ignore:missing_enum_constant_in_switch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a new AppLifecycleState.hidden enum value added in the latest stable version of Flutter. This line was added to ignore the check to add all enum values to the switch.

@dshukertjr dshukertjr marked this pull request as ready for review August 22, 2023 10:35
@dshukertjr dshukertjr merged commit af8e368 into main Aug 22, 2023
10 checks passed
@dshukertjr dshukertjr deleted the fix/realtime-apikey branch August 22, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants