slackapi / node-slack-sdk

Slack Developer Kit for Node.js
https://slack.dev/node-slack-sdk
MIT License
3.26k stars 656 forks source link

web-api: oauth.v2.exchange is missing token parameter #1778

Closed iggyray closed 2 months ago

iggyray commented 2 months ago

The arguments for oauth.v2.exchange are defined by OAuthV2ExchangeArguments.

export interface OAuthV2ExchangeArguments extends Pick<OAuthCredentials, 'client_id' | 'client_secret'> {
}

It seems like the token parameter is missing here.

Packages:

Select all that apply:

Reproducible in:

Slack SDK version: "@slack/web-api": "^7.0.2",

filmaj commented 2 months ago

Hmm I suppose the v6.x line of this module papered over this by extending from WebApiCallOptions which allowed for any property to be passed in - but also didn't explicitly require a token.

The API reference docs for this method are also not very extensive 😞

Looking into it!

filmaj commented 2 months ago

The fix is now live in 7.0.4 of the library: https://github.com/slackapi/node-slack-sdk/releases/tag/%40slack%2Fweb-api%407.0.4 and on npm. Thanks for reporting!

filmaj commented 2 months ago

BTW the docs also got updated 😄 https://api.slack.com/methods/oauth.v2.exchange