You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new ExpressReceiver({
// config
installerOptions: {
stateVerification: false,
},
// more config
})
Run the app
Visit /slack/install
Expected result:
A nice "Add to Slack" button
Actual result:
Error: StateStore is not properly configured
at new GenerateInstallUrlError (/MY_APP/node_modules/@slack/oauth/src/errors.ts:22:1)
at InstallProvider.<anonymous> (/MY_APP/node_modules/@slack/oauth/src/install-provider.ts:341:13)
at step (/MY_APP/node_modules/@slack/oauth/dist/install-provider.js:44:23)
at Object.next (/MY_APP/node_modules/@slack/oauth/dist/install-provider.js:25:53)
at /MY_APP/node_modules/@slack/oauth/dist/install-provider.js:19:71
at new Promise (<anonymous>)
at __awaiter (/MY_APP/node_modules/@slack/oauth/dist/install-provider.js:15:12)
at InstallProvider.handleInstallPath (/MY_APP/node_modules/@slack/oauth/dist/install-provider.js:295:16)
at /MY_APP/node_modules/@slack/bolt/src/receivers/ExpressReceiver.ts:283:29
at Layer.handle [as handle_request] (/MY_APP/node_modules/@slack/bolt/node_modules/express/lib/router/layer.js:95:5)
seratch
added
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
pkg:oauth
applies to `@slack/oauth-helper`
and removed
untriaged
labels
Jul 3, 2022
I have my app enabled for org-wide installs.
Org apps require
stateVerification
is set tofalse
, however, this breaks the/slack/install
handler.A
stateStore
is only created if you havestateVerification=true
: https://github.com/slackapi/node-slack-sdk/blob/main/packages/oauth/src/install-provider.ts#L133Down the line in
handleInstallPath
it bails out when nostateStore
exists: https://github.com/slackapi/node-slack-sdk/blob/main/packages/oauth/src/install-provider.ts#L340-L342I believe this was introduced in #1436.
It's very possible I'm missing something but it was working with
"@slack/bolt": "^3.10.0",
.Packages:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
Reproducible in:
Definitely 2.5.3
Probably from 2.5.0 (this was the first release after #1436)
Node.js runtime version
v16.14.0
OS info
Steps to reproduce:
stateVerification
asfalse
/slack/install
Expected result:
A nice "Add to Slack" button
Actual result:
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: