Closed J0 closed 1 week ago
Hey @J0. I noticed that the HTTP hooks UI has been merged—thank you for your efforts on this! However, I'm encountering an issue: I'm unable to connect the edge function to Authentication as a hook. It seems that the hooks currently only accept database functions. Is there anything specific I need to do to establish this connection to the Edge functions?
Thank you for your assistance.
Hey @mutumbakato,
Apologies on the delayed reply - it's merged but currently behind a feature flag. Should be unflagged once the docs go in
Thanks for the update, I'll be waiting for the actual release.
@J0 Any update on this? Can see sms hook in UI, But not firing. Any update would be helpful. Thank you.
Hey @shaharyarrahmad,
Yup that is correct - it is behind a feature flag. We're done with the implementation for the most part but need to release the docs and go through the implementation. I know it has taken quite a while but it is coming soon.
Do check back mid Aug - in the meantime feel free to use the locally hosted version or let us know if there's a specific provider you'd like to see so we can look into examples or similar
Thank tou @J0 .. looking forward to it.
hi everyone, we've just released the "Send SMS" hook - you can check out the following links:
Hey Kang, thanks a lot for shipping this, it's going to be very helpful. I've been trying it out and I realised that I still can't enable phone auth provider without selecting one of the listed phone providers. It there any other way I can do this?
@mutumbakato thanks for raising this - i've made a fix for it here so it should work properly now (https://github.com/supabase/supabase/pull/28706)
Regional SMS Senders
We're accepting contributions for regional SMS providers via the Send SMS Hook.
Contributors for select SMS providers (e.g. msg91 (@MeetChaudhari) and Africa's Talking (@mutumbakato) ) can add the following lines to your
config.toml
on the latest version of the CLI to enable the hook locally. If you are interested in contributing a regional provider for a hook which is not msg91 or Africa's Talking please make a comment with the provider name below.Note that this feature is only available for use with the CLI locally - it will be available on Supabase projects once we merge the frontend
This configuration assumes we're using a Supabase Edge Function which is called
sms_sender
though in practice you can use any HTTP endpoint of your choosing. With respect to the secret, it should take the formv1,whsec_<standard-base64-string>
. You can use a generic base64 encoding tool to help generate the base64 string.You can view the wip docs and example README for details about HTTP Hooks. You can use the JSON Schema Faker Tool in tandem with the Send SMS JSON Schema provided in order to generate a fake payload to test the function with.
Let us know if there's anything unclear or if there are any further questions or concerns. Thanks!
Details About Contributing
Contributing Format
We may feature some of the functions on our Edge Function Guides - if you wish for your regional sender to be considered, please paste a link to a Github repository containing a
README.md
, an.env.local
file, and anindex.ts
file containing the function content. We will then check with the appropriate team to see whether it would fit into the guides.Here's the README outline:
Your-edge-function-name
Example:
Use this Hook with the Send SMS Extension Point to send a message with an AppHash via Twilio Programmable Messaging. The App Hash identifies a mobile application and is embedded it an SMS to allow an Android application to determine that the message was intended for the Application. In turn, this allows for the App to fetch specific information, such as OTP codes, to perform autofill so that the user does not have to exit the application to retrieve information from a message.
Configuration
Example:
Copy the following environment variables from the Twilio Console into your
.env.local
file:Testing
Any other points of note?