mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 11:14:34 +08:00
* feat: add documentation and UI integration for Before User Created hook - Added new guide: `before-user-created-hook.mdx`, documenting usage, inputs, outputs, and multiple complete examples for HTTP and SQL. - Updated navigation menu and hook index table to include the new hook. - Hook is now listed as available on Free and Pro plans. Studio changes: - Registered `Before User Created` hook in `hooks.constants.ts` with proper title, slug, and configuration keys. - Enabled Docs button linking to hook guide in both `CreateHookSheet` and `HookCard` components. - Extended hook listing page to support docs access via `secondaryActions`. This hook allows developers to intercept and reject user creation across all flows (email/password, OAuth, SSO, SAML, anonymous) - enabling custom signup logic like domain allowlists, geofencing, or account gating. * fix: add subnet to mdx lint allowed list * fix: incorporate feedback and spelling changes * feat: add allow/deny domain and CIDR examples to before-user-created hook This commit enhances the documentation for the before-user-created auth hook: - Adds production-ready SQL examples for blocking or allowing signups by email domain (signup_email_domains) and IP address or CIDR (signup_networks) - Introduces enum-based classification (allow vs deny) for both domain and network restrictions - Adds full migration-style snippets for easy copy/paste into Supabase SQL Editor - Includes updated HTTP examples that delegate to Postgres functions via Supabase client rpc() - Adds environment setup guidance and edge function scaffolding * fix: pnpm format --------- Co-authored-by: Chris Stockton <chris.stockton@supabase.io>