I want to create a custom Auth hook for my DB and I was under the impression I could. However I noticed one can only create a hook based on the ones present in the screenshot attached.
My use case is as follows (with some omissions for simplicity): - I have a DB table with 2 columns:
email
email
(text) and
allowed
allowed
(boolean) - When a user wishes to sign up both through Google or password, I want to check whether he is allowed - If there is no record with the email -> Send error A so the FE can send user on path A - If the email exists on the table with
allowed: false
allowed: false
-> Send error B so the FE can send user on path B - If the email exists on the table with
allowed: true
allowed: true
-> Allow signup
Which of the possible restricted list of hooks is more suitable for this? Does it even matter which
<hook_name>
<hook_name>
I choose if the SQL hook will not be written like the docs?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.