Skip to content
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

Removes unnecessary 'token' param from request to Slack for user info. #287

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

robot-soul
Copy link
Contributor

Slack API now requires token to be passed in Authorization header instead of query params. Passing it in params causes 'invalid_auth' error.

The token is already being correctly passed in the Authorization header so this PR just removes the token from the query params.

Its presence causes 'invalid_auth' error because Slack API now requires token to be passed in Authorization header.
@joshbuker
Copy link
Member

@robot-soul Thanks for opening a PR to fix this issue! I'm super slammed right now, and it would be really helpful if you could give me a link to the line of code where it sends the token within the auth header so I can verify. Otherwise I'll take a look when I have a spare minute and merge/release a patch update.

@simon-bigsofa
Copy link
Contributor

Hey @athix - no problem! Thanks for the prompt response :)

I think this happens in the oauth2 gem:

https://github.com/oauth-xx/oauth2/blob/422d3132343227cec84d5d34a7a8ce4825439bdb/lib/oauth2/access_token.rb#L155

Copy link
Member

@joshbuker joshbuker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @robot-soul, looks like the token is passed as a part of the OAuth2 gem, and none of the other providers have the token passed manually. Seems reasonable to me.

@joshbuker joshbuker merged commit 24efa86 into Sorcery:master Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants