-
Notifications
You must be signed in to change notification settings - Fork 2
consumer anon key setup
github-actions[bot] edited this page Jun 2, 2026
·
1 revision
title: "How do I issue a consumer anon-key for library events?" reviewed_by: date: 2026-06 version: 3.5.x
Library events (T2 telemetry — framework-supabase.library_events) require a
per-consumer anon-key so that the framework's RLS policies can attribute
incoming rows to the right consumer app.
From the framework root (claude-product-cycle):
# 1. Issue a per-consumer anon-key for the framework-supabase project.
bash core/scripts/library-events-db.sh issue-consumer-anon-key \
my-app-slug owner@my-org.com
# 2. Push the key to the active secrets vault.
/secrets push --category supabase \
--id library-events-anon-key \
--account-email owner@my-org.com
# 3. Pull into your consumer project so the cmp-observe hook reads it.
cd workspaces/<ws>/<consumer-project>/source/<consumer-project>
/secrets pull// Inside your consumer init path:
val anonKey = BuildConfig.LIBRARY_EVENTS_ANON_KEY
SupabaseEventsHook(anonKey = anonKey).register()- The anon-key is per-consumer — DO NOT reuse one consumer's key in another
app; the framework's
consumer_idclaim is derived from the key issuer. - On rotation: re-run
issue-consumer-anon-key, the old key remains valid for 24h to drain in-flight events. - iOS / Android consumer apps inherit the key via the standard
secrets-pullmaterialization —local.properties(Android Gradle) /Secrets.swift(iOS BuildSettings).
- Module: cmp-observe
- See also: Register Firebase hooks at app startup
- Internal docs:
docs/guides/library-observability/LIBRARY_OBSERVABILITY_GUIDE.md(framework-side)
** Partials**
App Intents
Bubble
Clipboard
Cookbook
- Clipboard Copy Text
- Clipboard Read Text
- Consumer Anon Key Setup
- Crashlytics Attribution Per Library
- Ifonline Block
- Index
- Index
- Index
- Index
- Open Url Compose
- Pick And Share Image
- React To Offline
- Register Firebase Hooks
- Share Pdf Android
- Share Text
- Wifi Vs Cellular
Firebase Analytics
In App Update
Intent Launcher
Inter App Comms
Modules
- Cmp App Intents
- Cmp App Intents Compose
- Cmp Bubble
- Cmp Clipboard
- Cmp Deep Link
- Cmp Firebase Analytics
- Cmp In App Update
- Cmp Intent Launcher
- Cmp Intent Launcher Compose
- Cmp Library
- Cmp Network Monitor
- Cmp Network Monitor Compose
- Cmp Observe
- Cmp Observe Koin
- Cmp Open Url
- Cmp Pdf Generator
- Cmp Product Tickets
- Cmp Remote Config
- Cmp Share
- Cmp Share Compose
- Cmp Toast
Network Monitor
Open Url
Pdf Generator
Remote Config
Share
Toast
User Tickets
General