PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 10:30 PM

Supabase Webhook help

  • unicodes

    1 month ago

    I have some steps in the signup form, first includes adding first name, last name, phone, and second is email and password. I was looking for a solution to save che first step info in the table users_info, but only after validation. Considering validation is happening from an url in a new window, I want something that after the api signup responds to call a new api for updating the users_info table.

    Found out that webhooks could work in this case, but never used it.
    Can you please help me understand better how to use webhooks and if is a solution for what I want to achieve? Is there something better?

    Thank you!
  • Lucas G

    1 month ago

    What is the workflow that you are trying to accomplish?
  • The goal of it
  • There could be different ways to go about it
  • unicodes

    1 month ago

    I have in one shot "First Name, Last Name, Phone, Email and Password." By clicking on the "create account" I'm calling the api to create account. After creating the account I receive a response of the api with the auth ID and on email the link with the token. Is there a way after the response of the "SignUp with the auth ID" to save the first name, last name, phone on the table users_info? Users_info is with auth users insert only.
  • Lucas G

    1 month ago

    Database functions
  • Trigger off new row in auth.users
  • INSERT new row into users_info
  • You can probably use supabase AI to give you the SQL for it
  • Lucas G

    1 month ago

    You can also just do an API on load on the new page that sends user metadata to the user table
  • Probably easier to do that lol
  • The auth endpoint has all that data
  • unicodes

    1 month ago

    The trigger works for auth table? I tried and I can trigger just public tables.
  • Fisher

    1 month ago

    I dont think you can trigger and insert into the auth table, but I'm sure you can trigger based on a new input to the auth table.

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.