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 an initial Add to Slack flow, you can't mix the
identity.basic
scope with other team-wide scopes being requested (liketeam:read
orusers:read
). However, Slack does give us the currently signed in user_id inside ouraccess_token.params
object. So, if for whatever reason our user_identity['id'] is nil, we should grab the user_id fromaccess_token.params
so that we get the current users information instead of an error.