From d5d7e1ab8fcfee6dbb9d6dea2892fadb1b59741b Mon Sep 17 00:00:00 2001 From: Joel Lee Date: Tue, 13 Feb 2024 11:58:25 +0800 Subject: [PATCH] feat: deprecate existing webhook implementation (#1417) ## What kind of change does this PR introduce? We deprecate the existing HTTP webhook implementation to make way for Auth HTTP Hooks. We put up a deprecation notice as a warning and fully deprecate the configuration in the next release ## What is the current behavior? We have webhooks but it is unused on the Supabase Auth platform ## What is the new behavior? We remove webhooks in this PR and add [Standard Webhooks compliant](https://www.standardwebhooks.com/) HTTP Hooks. We should also add a deprecation notice on the release ## Additional context --------- Co-authored-by: joel --- README.md | 2 ++ internal/api/api.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 449fa3ca1..3070640f3 100644 --- a/README.md +++ b/README.md @@ -664,6 +664,8 @@ Default Content (if template is unavailable):

Change Email

``` +> ⚠️ As of 12th Feb 2024, Webhooks are deprecated and will be removed in the next release. We will be replacing the existing Webhooks implementation with a similar HTTP Hook system in the coming weeks. + `WEBHOOK_URL` - `string` Url of the webhook receiver endpoint. This will be called when events like `validate`, `signup` or `login` occur. diff --git a/internal/api/api.go b/internal/api/api.go index e592a23d9..a973f0adf 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -66,6 +66,9 @@ func (a *API) deprecationNotices(ctx context.Context) { if config.JWT.DefaultGroupName != "" { log.Warn("DEPRECATION NOTICE: GOTRUE_JWT_DEFAULT_GROUP_NAME not supported by Supabase's GoTrue, will be removed soon") } + if config.Webhook.URL != "" { + log.Warn("DEPRECATION NOTICE: GOTRUE_WEBHOOK_URL not supported by Supabase's GoTrue, all GOTRUE_WEBHOOK related configuration will be removed after v2.139.2") + } } // NewAPIWithVersion creates a new REST API using the specified version