Skip to content

Undefined index "user_id" #24

Description

@roberttolton

Hi, thanks for this library - it's working fine for the first user (me), but any subsequent users that try and authenticate with my app are met with an Undefined index "user_id" error from AdamPaterson\OAuth2\Client\Provider\SlackAuthorizedUser->getId().

I can't figure out why it would be successful for one user (me, the one who installed the App into the Workspace) and not for other users?

When I look at $token from $provider->getAccessToken() the scopes are a bit different:

From a flow that worked:
identify,commands,incoming-webhook,channels:read,groups:read,users:read,identity.basic,identity.email,identity.avatar,identity.team

From a flow that didn't work:
identity.basic,identity.email,identity.avatar,identity.team

But the JSON that this scope data comes from, from Slack, is shown as ok and even has the accessToken in the response - it's not like there's a user_id property existing in one and not the other, so I'm kind of at a loss as to which point in the flow the user_id index is missing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions