verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 69 forks source link

`not_authed` error with Slack integration #1942

Closed shifuma closed 1 week ago

shifuma commented 1 week ago

Describe the bug

I have a Slack integration setup and connecting properly, however, when I trigger a submission to post to Slack I get this error: API error: “not_authed” /home/mysite.com-deploy/mysite.com/18062024_025339/vendor/verbb/auth/src/clients/slack/provider/exception/SlackProviderException.php:19

I've double and triple-checked my Client ID & Secret and they're correct. When deliberately using the wrong secret and trying to connect the integration, I get a different error. So I'm confident those are right.

On the Slack side, I've setup the Redirect URL and authorised the app properly. The only Scope under OAuth & Permissions is incoming-webhook, but that's been the same since Craft 4.

Have I missed anything in the setup?

Steps to reproduce

Maybe you won't be able to reproduce?

  1. Setup Slack integration from Formie Settings
  2. Connect with Slack
  3. Create a form submission and trigger the integration to post to Slack

Form settings

Craft CMS version

5.2.1

Plugin version

3.0.0-beta.15

Multi-site?

No

Additional context

I recently upgraded to Craft 5 / Formie 3. Prior to that this was working ok.

engram-design commented 1 week ago

Can I ask what sort of "Channel Type" you're using? Is it a channel, direct message or webhook?

shifuma commented 1 week ago

I was using a Public Channel previously. Now I'm not able to select it - I get the same not_authed error when refreshing the channels. The same happens with Direct Message selected (the error is not showing in the browser, but is in the logs)

https://github.com/verbb/formie/assets/86767543/18c6dfea-a601-4edd-ad78-1f6adeffc375

engram-design commented 1 week ago

Looks like this was an issue with the auth module. You should be able to get that updated alongside Formie via composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.15" -W.

shifuma commented 1 week ago

Thanks Josh! That resolved it for me.