-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(cdp): add missing oauth scopes warning #26738
Conversation
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this is pretty good, just would love to think a bit bigger than just hubspot - this same issue applies to all of our oauth integrations
}), | ||
}} | ||
> | ||
Required scopes are missing: [{missingScopes.join(', ')}]. Note that some features may not be available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like the hubspot part could be omitted and instead just left out as it makes this needlessly unique to hubspot when it could for sure work (and should) for all the other oauth things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it could work for multiple oauth integrations, but the way to get the authorized scopes is really different as it seems:
- Slack - In the
x-oauth-scopes
headers from the token info URL. - Hubspot - Under the
scopes
key from the token info URL. - Google - Under the
scope
key from the token info URL OR under thescope
key from the token URL.
Will look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed some changes to generalize the logic. We'll grab authorized tokens from multiple possible locations:
370d97a
(#26738)
I've also added requiredScopes to our existing templates with oauth integrations.
…hen getting an access token
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - trusting you've done some decent testing to see that this actually works for slack etc.
…-top-to-bottom-edit--dark.png
Problem
https://posthoghelp.zendesk.com/agent/tickets/21531
Changes
requiredScopes
field to the oauth inputDoes this work well for both Cloud and self-hosted?
How did you test this code?