Skip to content

feat(ui, api): auto-add missing scopes on flow enable #3858

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

Conversation

SteliosMav
Copy link
Contributor

🐞 Issue

In the Quickstart, the required scopes are only mentioned when setting up the Slack OAuth app, but not when creating the integration or enabling endpoints.

As a result, if you follow the Quickstart exactly as written, you’ll run into the following error when trying to create a new connection with that integration:

Invalid permissions requested  
No scopes requested

🛠️ Fix

Instead of mentioning the scopes in the docs when setting up the integration or enabling endpoints, have the endpoints automatically add their corresponding scopes to the integration.

Since scopes are required when adding a connection, and the necessary scopes are already known based on the enabled endpoints, it would make sense to automatically include them when setting up the integration. This would reduce manual configuration and make the process more intuitive.

When enabling, any missing required scopes should be added to the integration.
When disabling, scopes should not be removed, since the user might have added them manually for other endpoints that require the same scopes.

🧪 Testing Instructions

  1. Start with an integration that does not have any scopes, or remove them manually.
  2. Go to the Endpoints page and enable an endpoint that requires a specific scope.
    • ✅ The required scope should automatically be added to the integration's scopes.
  3. Now, disable the same endpoint.
    • ✅ The scope should not be removed from the integration.
  4. Re-enable the same endpoint.
    • ✅ The scope should not be added again since it already exists once.

@TBonnin TBonnin requested review from a team and hassan254-prog April 8, 2025 00:34
@khaliqgant khaliqgant removed the request for review from hassan254-prog April 12, 2025 05:24
@khaliqgant
Copy link
Member

Thanks for the contribution and sorry for the delay here. Unfortunately this doesn't fully solve the problem and is something we'll look to improve internally in combination with input from the product team.

Closing this PR.

@khaliqgant khaliqgant closed this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants