-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 Error when trying to install app using the "Add to Slack" button on the Distribution tab #492
Comments
OAuth flow is not yet supported in Bolt for JS. #479 is going to add the feature. If you're in a hurry to support OAuth flow, take a look at the primitive package in node-slack-sdk. https://slack.dev/node-slack-sdk/oauth |
I tried following https://slack.dev/node-slack-sdk/oauth. By installing the @slack/oauth package and setup the InstallProvider with the following code:
I see the call make it into the handleCallback method, but after that I'm getting a error:
Any ideas? |
@T-Roth looks like a bug in the OAuth package. I'm going to file an issue for it shortly here. |
@T-Roth for now, you can setup a This will create a custom The manage distribution |
I got it mostly working when I generate my own install url. But what should happen to the page after I click the "Allow" button? Currently I see the following; and after clicking "Open" the Slack app opens and takes me to my app, but the page is still there with the spinner on the "Allow" button. Should that page close or redirect, or do something? |
@T-Roth that is our default success handler which redirects back to the slack app. It is expected that you would close that page. I'll see if we can add an initial web redirect first that would maybe give the user a better visual before redirecting to the native app. |
@T-Roth I've gone ahead responded to the "Add to Slack" from "Manage Distributions" issue. See: slackapi/node-slack-sdk#1009 (comment) TLDR: We decided the oauth library is not going to support the "Add to Slack" button from "Manage Distributions" due to security. |
@T-Roth sent a PR adding adding a success tab which handles the slack app redirect. Better experience for the users. slackapi/node-slack-sdk#1011 |
I had a user who doesn't have the desktop version of Slack test the install button, They page just sits there with a spinner on the allow button. Shouldn't it take them to the website version of Slack? |
@T-Roth there is no way to for the redirect to determine if a user has the desktop version installed or not. For this library, we decided the best default behavior is attempt to open the app. But if you want a different experience (Say opening browser version instead), then you would have to override the built in success callback and provide your own success callback. See https://slack.dev/node-slack-sdk/oauth#handling-the-oauth-redirect |
According to #479, i've tried to use the oauth workflow provided by this library. But its not working as expected. When slack redirect user to /slack/oauth_redirect, the app return 404.... |
hey @KazuAlex! I believe you are missing Lastly, make sure you do have the latest bolt. I've found that sometimes removing |
Thanks @stevengill for your response. Your solution works. I probably misunderstanding the doc. |
Ngrok is reporting that I'm getting a 404 when trying to install my app using the "Add to Slack" button on the Distribution tab? Does the app need to respond to a certain event to use the "Add to Slack" button or am I missing some configuration option somewhere? I'm able to install the app to my workspace from the App Directory within the Slack app.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)This is what ngrok shows for the request
The text was updated successfully, but these errors were encountered: