supabasesupabase-databasesupabase-flutter

how to access auth.users table for functions trigger


I need some help with supabase triggers. I am trying to follow along with this tutorial here, however I can't seem to figure out how to access the auth.users table, as it seems to be protected. When I try to create a trigger all I get are the public tables I created in the project. How do I watch the auth users table? enter image description here


Solution

  • Ok so if you want to create a trigger from the auth.user table you need to go into the SQL editor and run this:

    create trigger on_auth_user_added after insert on auth.users for each row execute function handle_new_user();