---
title: "Supabase Realtime: Broadcast and Presence Authorization"
description: "Supabase Realtime now supports authorization for Broadcast and Presence channels using Postgres Row Level Security policies on a managed `realtime.messages` table, where SELECT policies govern receiving and INSERT policies govern sending."
url: "https://swe.quest/articles/supabase-realtime-broadcast-and-presence-authorization-db4d8e985aa735a7"
canonical: "https://supabase.com/blog/supabase-realtime-broadcast-and-presence-authorization"
source: "Supabase"
published: "2024-08-13"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["realtime","identity-auth","postgres"]
---

# Supabase Realtime: Broadcast and Presence Authorization

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-08-13, 6 min read, Announcement. Original: [https://supabase.com/blog/supabase-realtime-broadcast-and-presence-authorization](https://supabase.com/blog/supabase-realtime-broadcast-and-presence-authorization)

## Summary

Supabase Realtime now supports authorization for Broadcast and Presence channels using Postgres Row Level Security policies on a managed \`realtime.messages\` table, where SELECT policies govern receiving and INSERT policies govern sending. Clients opt in with a \`private: true\` channel config, and policies can reference the channel name via \`realtime.topic()\` and the extension column. On subscription, the server loads JWT claims into a Postgres transaction with \`set\_config\`, runs rolled-back SELECT/INSERT probes against the table, and caches the resulting per-socket policy map in memory. This adds latency only at connect time, and policies are re-checked on reconnect or token refresh, so token expiry controls how quickly policy changes take effect.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- Postgres Row Level Security ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- JWT authentication ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- WebSockets ([easy posts on Real-time systems](https://swe.quest/tags/realtime.md?difficulty=easy))

## Keywords

Supabase Realtime, Row Level Security, Broadcast, Presence, supabase-js, JWT

## Related posts

- [Realtime: Broadcast from Database](https://swe.quest/articles/realtime-broadcast-from-database-42fdc3186500936d.md): Supabase · 2025-04-02 · Medium · 3 min read · Real-time systems, PostgreSQL, Replication
  Supabase Realtime's Broadcast from Database sends database change events to clients through Postgres triggers that write to a \`realtime.messages\` table.
- [Flutter Authorization with RLS](https://swe.quest/articles/flutter-authorization-with-rls-f1170d28eed05738.md): Supabase · 2022-11-22 · Medium · 25 min read · PostgreSQL, Identity & auth, Mobile, Real-time systems
  Extends a basic Flutter real-time chat app into a 1-on-1 chat with authorization enforced by PostgreSQL Row Level Security on Supabase.
- [Realtime: Multiplayer Edition](https://swe.quest/articles/realtime-multiplayer-edition-cca475e0a0be51ab.md): Supabase · 2022-08-18 · Medium · 8 min read · Real-time systems, Elixir & Erlang, PostgreSQL, JavaScript
  Supabase Realtime's Broadcast and Presence features are now generally available, with every feature organized around Channels that also carry Postgres change events.
- [Realtime Postgres RLS now available on Supabase](https://swe.quest/articles/realtime-postgres-rls-now-available-on-supabase-037d74a22092b0d5.md): Supabase · 2021-12-01 · Medium · 5 min read · PostgreSQL, Real-time systems, Identity & auth, Replication, Performance engineering
  Supabase Realtime now enforces PostgreSQL Row Level Security on change broadcasts.
- [Flutter Tutorial: building a Flutter chat app](https://swe.quest/articles/flutter-tutorial-building-a-flutter-chat-app-942d133b45bb7fa6.md): Supabase · 2022-06-30 · Medium · 19 min read · Mobile, Real-time systems, PostgreSQL, Communications
  A real-time single-room chat app can be built with Flutter on the frontend and Supabase as the entire backend, using the supabase\_flutter SDK instead of a custom API.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
