All blocks

Collaboration

Push devices

The push tokens of each user's devices (Expo, FCM, APNs or Web Push) with RLS, behind register_push_device and unregister_push_device for the user and push_tokens_for and prune_push_tokens for the service role. better-supabase/blocks/push registers Expo devices and sends through the Expo Push API.

DocsModes:managedcustom
terminal
npx better-supabase sql add push
better-supabase.config.ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  sql: {
    modules: {
      // Modes: "managed", "custom". The default is "managed".
      push: { mode: "managed" },
    },
  },
});