Patreon Webhooks 失效

I wonder if @Falco or anyone else could help.

I recently started using Patreon and I’ve set up a Discourse server in a Digital Ocean Droplet. I also installed the discourse-patreon plugin and entered all the keys etc. following this tutorial. I’m able to click the Update Patreon Data & Sync Groups button on the Plugin > Patreon > Filters page, and this works fine. All of my tiers are available and I’ve assigned all of them to Discourse Groups etc.

All seemed fine, but then I received an email from the Patreon servers telling me:
We’re writing to let you know that a WebHook POST to https://discourse.martinbaileyphotography.com/patreon/webhook has failed. As a result we’ve paused on sending more events to your URL.

I have tried setting up the client with both API 1 as specified in this post and API 2 changing the keys and secrets accordingly each time, and trying the top three deprecated events and the bottom six with both APIs, and I cannot find a combination that works.

In my Discourse logs, I’ve found this error message:
(patreon) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected

I’ve asked Digital Ocean and they do not block POST requests and can’t think of any reason with their system why this would not work, so I’m stumped. I can’t find any useful information to help me fix this, so I’m now posting here (and in the Patreon forum) in the hope that this rings a bell with someone. Can anyone offer any advice on either how to fix this or what to check in order to troubleshoot this issue further.

Thanks in advance for any help anyone can provide!

Regards,
Martin Bailey.

2 个赞

When configuring webhooks you should only enable the deprecated ones as explained in Configuring Patreon integration with Discourse and configure the secret in site settings.

If they still fail, it may be a problem on the Patreon side. Can you ask their support for detailed logs for the failures?

2 个赞

谢谢 @Falco

我会问他们。他们已经告诉我他们不为 API 提供支持,这很可惜。我开始时没有意识到 Patreon 是一家糟糕的公司。

好的,那么我将使用已弃用的选项。我应该也使用 API v1、webhook 吗?我最初尝试了两者,但几周没有再尝试过了。

感谢您的帮助。

4 个赞

是的,请使用 v1 版本。

3 个赞

谢谢,@Falco 我已将所有内容切换回,并更改了所有 API 密钥和密钥。手动测试返回的状态码为 200,因此调用已成功。我今天早上还注意到,当我检查 Discourse / Patreon 插件时,数据显示已于 5 小时前同步。五小时前我还在睡觉,所以有些事情正在发生,但我仍然看到红色的“Webhook Paused”消息,并且点击“Resume”按钮会导致另一个错误累积。

无论如何,我将向 Patreon 团队请求详细日志,看看他们怎么说。

再次感谢你的帮助。

2 个赞

您好 @Falco

我在我那堆积如山的收件箱里找到了来自 Patreon 支持的回信,他们只是说无法提供日志。我还注意到他们关闭了他们的社区支持论坛。

我仍然看到这些错误,尽管有些同步工作正常,因为我看到了一些在我睡觉时系统同步的消息,但新赞助者在付款后仍然没有被自动添加。我通过创建包含根据新赞助者等级访问各种类别的邀请来解决这个问题,但我必须手动发送这些邀请,所以不是很顺畅。我还担心那些停止贡献的人可能不会从我的 Discourse 社区中被移除,虽然我仍然只有少数赞助者并且可以检查,但如果我开始获得一些良好的参与度并推广我的 Patreon 项目,我可能会失去对这方面的关注,事情会变得一团糟。

总之,我知道这本身不是您的问题,但我真的对 Patreon 方面对这些集成提供的支持为零感到失望,尽管他们曾在营销中使用这些集成来吸引人们开始使用他们的系统。

此致,
Martin。

Webhook 支持使同步能更快地响应更改,但该插件在没有它的情况下也能 100% 工作。我们将每 6 小时进行一次完全同步,捕获所有新赞助者,并移除已离开赞助者的访问权限。所以你不用担心这类事情。

就我所知,这个插件完全由 Discourse 的我们创建,没有 Patreon 的支持,所以只要他们的 API 存在,我们就能让它正常工作。

1 个赞