-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add custom sms hook #1474
Conversation
98ffa35
to
6aa36dd
Compare
fbce0d4
to
7283622
Compare
## What kind of change does this PR introduce? Splits out config changes from #1474 - rename runHook to runPostgresHook - Allow http with https hooks only on localhost
5f2b7ef
to
e885fe3
Compare
8d1341e
to
a156a5b
Compare
I've realized I'd need an endpoint to run any sort of load against in order for there to be a meaningful metric. I've considered the following options:
Let me know if there are any preferences As an aside, I've realized I will likely need to allow for http with |
Test script for future reference (simulate periodic requests)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, would improve the errors / logs a bit.
Co-authored-by: Stojan Dimitrovski <[email protected]>
For reference closer to release:
|
🤖 I have created a release *beep* *boop* --- ## [2.146.0](v2.145.0...v2.146.0) (2024-04-03) ### Features * add custom sms hook ([#1474](#1474)) ([0f6b29a](0f6b29a)) * forbid generating an access token without a session ([#1504](#1504)) ([795e93d](795e93d)) ### Bug Fixes * add cleanup statement for anonymous users ([#1497](#1497)) ([cf2372a](cf2372a)) * generate signup link should not error ([#1514](#1514)) ([4fc3881](4fc3881)) * move all EmailActionTypes to mailer package ([#1510](#1510)) ([765db08](765db08)) * refactor mfa and aal update methods ([#1503](#1503)) ([31a5854](31a5854)) * rename from CustomSMSProvider to SendSMS ([#1513](#1513)) ([c0bc37b](c0bc37b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## What kind of change does this PR introduce? Splits out config changes from supabase#1474 - rename runHook to runPostgresHook - Allow http with https hooks only on localhost
## 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]>
🤖 I have created a release *beep* *boop* --- ## [2.146.0](supabase/auth@v2.145.0...v2.146.0) (2024-04-03) ### Features * add custom sms hook ([supabase#1474](supabase#1474)) ([0f6b29a](supabase@0f6b29a)) * forbid generating an access token without a session ([supabase#1504](supabase#1504)) ([795e93d](supabase@795e93d)) ### Bug Fixes * add cleanup statement for anonymous users ([supabase#1497](supabase#1497)) ([cf2372a](supabase@cf2372a)) * generate signup link should not error ([supabase#1514](supabase#1514)) ([4fc3881](supabase@4fc3881)) * move all EmailActionTypes to mailer package ([supabase#1510](supabase#1510)) ([765db08](supabase@765db08)) * refactor mfa and aal update methods ([supabase#1503](supabase#1503)) ([31a5854](supabase@31a5854)) * rename from CustomSMSProvider to SendSMS ([supabase#1513](supabase#1513)) ([c0bc37b](supabase@c0bc37b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## What kind of change does this PR introduce? Splits out config changes from supabase#1474 - rename runHook to runPostgresHook - Allow http with https hooks only on localhost
## 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]>
🤖 I have created a release *beep* *boop* --- ## [2.146.0](supabase/auth@v2.145.0...v2.146.0) (2024-04-03) ### Features * add custom sms hook ([supabase#1474](supabase#1474)) ([0f6b29a](supabase@0f6b29a)) * forbid generating an access token without a session ([supabase#1504](supabase#1504)) ([795e93d](supabase@795e93d)) ### Bug Fixes * add cleanup statement for anonymous users ([supabase#1497](supabase#1497)) ([cf2372a](supabase@cf2372a)) * generate signup link should not error ([supabase#1514](supabase#1514)) ([4fc3881](supabase@4fc3881)) * move all EmailActionTypes to mailer package ([supabase#1510](supabase#1510)) ([765db08](supabase@765db08)) * refactor mfa and aal update methods ([supabase#1503](supabase#1503)) ([31a5854](supabase@31a5854)) * rename from CustomSMSProvider to SendSMS ([supabase#1513](supabase#1513)) ([c0bc37b](supabase@c0bc37b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 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:
http
protocol . This is to support local development. Restriction to https can be done on the dashboard page for connecting a hook.