adam-paterson / adam-paterson/oauth2-slack

Undefined index "user_id"

Aberta
#24 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
PHP
Estrelas
22
Forks
20
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.