Supabase Signup Trigger Debugger
Paste redacted notes for Database error saving new user, public.handle_new_user, profile-row triggers, or Function Search Path Mutable warnings and generate a launch-safe debug plan.
Use this when
- 1Signup suddenly failsSupabase auth returns a database error after a trigger or profile-table change.
- 2Security Advisor also complainsThe same function has a
Function Search Path Mutablewarning. - 3You need a small rollback planThe fix must preserve signup, profile inserts, grants, and rerunnable evidence.
Use redacted notes only. Do not paste secrets, private connection strings, real user rows, customer records, payment data, private screenshots, full names, private handles, full transaction identifiers, credential values, service-role keys, or dashboard screenshots. This page runs locally in the browser and does not use network requests, browser storage, or a backend.
Ready.
Debug plan
Signup-safe fix order
- Find the exact failing side effect first: trigger exception, missing profile-table permission, broken metadata assumption, constraint failure, or stale trigger reference.
- If
public.handle_new_useris involved, make the functionsecurity definerwith a function-levelset search_path = ''when compatible, then schema-qualify every table reference. - Keep trigger teardown and recreation commands in the migration so a stale trigger does not continue calling an old function signature.
- Smoke-test one redacted signup after the migration and prove the profile row is created without exposing personal data.
- Review
grant executeseparately. Trigger helper functions usually do not need direct execution bypublic,anon, orauthenticated. - Rerun Security Advisor and keep the non-sensitive evidence packet with
pg_proc.proconfig, trigger name, rollback command, and signup smoke-test result.
Need a second pass?
The fixed-scope report can review one redacted Supabase signup trigger packet: likely root cause, search-path patch shape, grants to tighten, rollback command, and the exact signup smoke tests to run before launch.
Source-backed problem set
Supabase user management
Official docs show the
public.handle_new_user trigger pattern with function-level search_path.
Database error saving new user
Official troubleshooting says auth user insert errors are often trigger or side-effect failures.
User-management errors
Official troubleshooting covers auth trigger permissions and security definer behavior.
Live builder failure shape
Public question combines public.handle_new_user, signup failure, and the Security Advisor warning.