Closed julishaka closed 2 years ago
Hi @julishaka, thanks for writing in. I've checked whether your app works for me and it works without any issues.
Since your /slack/oauth_redirect
browser access has the state
parameter in its query string, you should start the OAuth flow from /slack/install
. The only possible causes that I think of are:
/slack/install
for some reason/slack/oauth_redirect
more than once (reloading the page etc.)I would suggest checking the details of HTTP request / response during your OAuth flow. You can check those information using your web browser's inspector and curl https://{your public domain}/slack/install -v
. I hope you will figure the cause out soon!
Hi @seratch, thank you for the quick response. Do you know of any reasons why the app wouldn't set cookies? I'm not sure what to look for when checking the details of HTTP request / response.
But I haven't visited /slack/oauth_redirect
directly multiple times. I always start the OAuth flow from /slack/install
. I don't think I've run multiple OAuth flows in the same browser at a time. If I did, the would the error go away just by closing tabs?
Thank you
I'm not sure what to look for when checking the details of HTTP request / response. You can verify the set-cookie headers in the /slack/install response and cookie header in the /slack/oauth_redirect request are valid.
Also, do you use the latest versions of @slack/bolt
and @slack/oauth
for sure? @slack/oauth@2.5.0 ~ 2.5.1
had a bug on setting cookies logic: https://github.com/slackapi/node-slack-sdk/pull/1485
I'm not suite sure what you mean by valid. This is what I see. Also, yes @slack/bolt
version 3.9.0 and @slack/oauth
version 2.5.4
slack/install:
/slack/oauth_redirect:
@julishaka Thanks for sharing the details. The cause must be the old version of bolt that you are using. Please upgrade to 3.11.0 or newer. The latest version as of today is 3.12.1.
Oh my goodness that fixed it. Thank you so much for taking the time to help me!
Glad to hear that! Let me close this issue now
Description
Hi, I'm getting this error when my app redirects to slack/oauth_redirect. I've looked at #1335 but I can't tell if its the same problem. The URLs are all https ones. I recently started using expressReceiver in order to be able to accept post requests from an external source. However, I may be using it incorrectly and thinking all wrong. Any help would be appreciated. Thank you.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)