From 3a90061aca3bf16646a8556f111e5a706d2803eb Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 27 Jul 2021 12:58:23 -0700 Subject: [PATCH] updated delete installation store example and fixed #939 --- docs/_basic/authenticating_oauth.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/_basic/authenticating_oauth.md b/docs/_basic/authenticating_oauth.md index b955d4226..47a467663 100644 --- a/docs/_basic/authenticating_oauth.md +++ b/docs/_basic/authenticating_oauth.md @@ -12,6 +12,8 @@ Bolt for JavaScript will create a **Redirect URL** `slack/oauth_redirect`, which Bolt for JavaScript will also create a `slack/install` route, where you can find an `Add to Slack` button for your app to perform direct installs of your app. If you need any additional authorizations (user tokens) from users inside a team when your app is already installed or a reason to dynamically generate an install URL, manually instantiate an `ExpressReceiver`, assign the instance to a variable named `receiver`, and then call `receiver.installer.generateInstallUrl()`. Read more about `generateInstallUrl()` in the [OAuth docs](https://slack.dev/node-slack-sdk/oauth#generating-an-installation-url). +**NOTE: The `Add to Slack` button on your apps App config page will not work with our Bolt's OAuth support. It does not include a state value. You must use the `slack/install` route created by your Bolt application to install the app.** + Bolt for JavaScript does not support OAuth for [custom receivers](#receiver). If you're implementing a custom receiver, you can use our [Slack OAuth library](https://slack.dev/node-slack-sdk/oauth#slack-oauth), which is what Bolt for JavaScript uses under the hood. To learn more about the OAuth installation flow with Slack, [read the API documentation](https://api.slack.com/authentication/oauth-v2). @@ -55,11 +57,11 @@ const app = new App({ // change the line below so it deletes from your database if (installQuery.isEnterpriseInstall && installQuery.enterpriseId !== undefined) { // org wide app installation deletion - return await myDB.delete(installQuery.enterpriseId); + return await database.delete(installQuery.enterpriseId); } if (installQuery.teamId !== undefined) { // single team app installation deletion - return await myDB.delete(installQuery.teamId); + return await database.delete(installQuery.teamId); } throw new Error('Failed to delete installation'); },