Replies: 3 comments 7 replies
-
@gerynugrh We are having a similar issue and have been struggling to make it work with a different SMS gateway. Could you provide more information about how the trigger above fits into the Supabase auth so we could maybe replicate? |
Beta Was this translation helpful? Give feedback.
-
Any updates on this ? Is there a way to have a custom SMS provider ? |
Beta Was this translation helpful? Give feedback.
-
https://medium.com/@lavisht22/optimizing-sms-authentication-costs-with-supabase-a-deep-dive-4a2f1b4a1a68 |
Beta Was this translation helpful? Give feedback.
-
For some users in ID, integrating phone auth with existing provider (Twilio, Message Bird) is not preferable given the high price per sms compared to other provider. Hence, currently we do this by using the following trigger
It works by generating another random OTP, hash, and then update
auth.users
while also inserting row into another temporary table for OTPs. Later, there will be an edge function that triggers when a record is inserted intotmp_otp_trigger
.We use this in our apps and it's working well, but is there a better way to do this that we haven't notice yet? Also side question, do you happen to know how to generate otps other than using pgsql
random()
function (given that this function is not cryptographically secure)?Beta Was this translation helpful? Give feedback.
All reactions