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

feat(realtime_client): Add support for authorized realtime channels with broadcast and presence. #970

Merged
merged 7 commits into from
Jul 12, 2024

Conversation

dshukertjr
Copy link
Member

@dshukertjr dshukertjr commented Jul 10, 2024

What kind of change does this PR introduce?

Adds support for authorization on broadcast and presence

What is the current behavior?

Authorization is not supported on broadcast or presence allowing anyone to listen to its messages.

What is the new behavior?

Realtime channel created with private: true will respect RLS. Read more on the official docs.

channel = supabase.channel(
  'my_channel',
  opts: const RealtimeChannelConfig(private: true),
);

Related JS PRs

@@ -32,6 +32,8 @@ class RealtimeChannel {
@internal
final RealtimeClient socket;

late final bool _private;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this attribute should be documented as well like in RealtimeChannelConfig

@dshukertjr dshukertjr requested a review from Vinzent03 July 11, 2024 02:40
@dshukertjr dshukertjr merged commit 8305fef into main Jul 12, 2024
9 checks passed
@dshukertjr dshukertjr deleted the feat/channel-authz branch July 12, 2024 02:45
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.

3 participants