adam-paterson / adam-paterson/oauth2-slack
Undefined index "user_id"
- Vorherrschende Sprache
- PHP
- Sterne
- 22
- Forks
- 20
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Start at AdamPaterson\OAuth2\Client\Provider\SlackAuthorizedUser->getId() and inspect the token returned by $provider->getAccessToken(). Compare the successful installer flow with the subsequent-user flow, including their scopes and Slack response data, then reproduce the missing user_id case. Done means the cause of the missing index and the affected authentication behavior are established.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php
- Bereich
- authentication
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100