Actor stamping
created-bySets created_by on insert and updated_by on every write from auth.uid(); an update keeps created_by and the impersonation stamp. Service writes keep the values they send.
Identity & accessmanaged
Install
It needs no other module.
npx better-supabase add created-byConfigure
The blocks entries in your config, with the default mode.
import { defineConfig } from "better-supabase/config";
export default defineConfig({
blocks: {
// Modes: "managed". The default is "managed".
"created-by": { mode: "managed" },
},
});Migrations
The files
npx better-supabase add created-by writes into your declarative schema with the default layout.Client
This block has no React entry yet. Its TypeScript side is in better-supabase/blocks/created-by, which runs on the server.
Events
With the outbox installed, the module writes these in the same transaction as the change.
This module writes no outbox events.
Dependencies
No dependencies
It installs on its own and integrates with no optional module.
Recipes
No UI recipe uses it yet. See all recipes.
More in Identity & access
- Data API grantsdata-api-grantsWrites the complete Data API privileges of the tables and functions in the `expose` config for anon, authenticated and service_role, or derives table grants from the policies. A project with default privileges turned off grants new tables to no Data API role.
- MFA enforcementmfamfa_satisfied() for restrictive policies: true when the caller has no verified factor, or verified one in this session (aal2).React hooks
- Access contractpermissionscan(), tenant_ids_with() and is_platform(): one permission contract for policies and SQL modules, over a roles list, a role and permission catalog, an authorization provider or the app's own functions (blocks.permissions.model).React hooks
- Session revocationsession-revocationsession_active() for restrictive policies: false once the caller's session was signed out or expired, or the user was banned or deleted, so revoked access tokens stop working before they expire. options.policies writes the policy on every table.React hooks
- SSO and SCIMssoVerified email domains with auto-join and SSO enforcement, SAML providers per organization registered with Supabase Auth, and SCIM 2.0 users and groups that provision memberships and map groups to roles.
- SubjectssubjectsThe app-wide subject registry from config.records: subject_title, subject_url, subject_titles, can_subject, can_subject_for and record_summary for every registered type, my_work across the installed blocks, and Realtime presence on presence:<type>:<id> for readers of the subject.React hooks