forked from supabase/auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add custom sms hook (supabase#1474)
## What kind of change does this PR introduce? Allows devs to use a Custom SMS Provider via a HTTP Hook. SQL Hooks are not supported at this time as it requires significantly more effort to invoke a Hook via `pg_net` and handle errors as compared to using HTTP/HTTPS. HTTP Hook invocation is done via the [standardwebhooks](www.standardwebhooks.com) library for symmetric hooks. Asymmetric hooks are being finalized by the committee and support will be added shortly. The following changes are being made from the internal RFC: - [x] Hooks have a timeout of 5 seconds instead of 15 seconds so as not to run for too long - [x] Hooks have a size limit of 20kb. This is not stated in internal RFC but is part of the recommendations under the standard webhooks RFC. - [x] We allow hooks using the `http` protocol . This is to support local development. Restriction to https can be done on the dashboard page for connecting a hook. - [x] Add log statements where relevant and write proper error messages - [x] Add more Gock tests --------- Co-authored-by: Stojan Dimitrovski <[email protected]>
- Loading branch information
Showing
18 changed files
with
412 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.