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

Fix user_info method for Add to Slack #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danielschwartz
Copy link

When going through an initial Add to Slack flow, you can't mix the identity.basic scope with other team-wide scopes being requested (like team:read or users:read). However, Slack does give us the currently signed in user_id inside our access_token.params object. So, if for whatever reason our user_identity['id'] is nil, we should grab the user_id from access_token.params so that we get the current users information instead of an error.

- When going through the standard Add to Slack authentication procedure, the user_identity["id"] is empty because you can't mix the identity.basic scopes with other team wide scopes. Luckily, Slack returns the current logged in users id in the access_token params object, so we should use that if user_identity["id"] is nil
@kevinelliott
Copy link

Any reason this never got merged in?

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.

2 participants