Prompt user to upgrade Slack app when necessary (when new scopes were added)
Problem
When we add certain features to our Slack app we may sometimes need to add new "granular bot" scopes to allow our Slack app to do more. An example is Link Unfurls &6389 which will require links:read
and links:write
scopes (docs). This requires our Slack app to be upgraded/reapproved in customers' workspaces in order for the new scopes to be approved/granted.
Note that changes to our Slack app that did not require new scopes to be added will be made available immediately to all customers as soon as the Slack app is republished - no manual upgrade step is needed. (Note: This is true for SaaS customers of the Slack App only, in future when self managed customers are supported &1211 (closed) they will always need to update their Slack App for every feature added to it).
The problem is written up well here:
Slack does not currently provide a way for end users to know that a newer version of an app is available. While an app can change all the backend code it likes to provide updated functionality to the end user, if those updates require new permission scopes, those new scopes must first be appended to the existing installation before any new features can be used on the workspace. While admins can check an app's directory listing page to see if new scopes are available for proactive approval, there isn't an obvious way for an admin to know when to check this page nor how to initiate the update if one is available.
The responsibility falls to app developers to notify admins and end users in Slack when such an update requiring action (i.e. install to append new scopes) is available.
Solution
Customers should be prompted when new scopes have been added and it's time for them to upgrade our Slack app.
Proposal
The prompt could take place in many different ways. A demo app gives an example of these methods: https://github.com/slack-samples/bolt-js-upgrade-app. From that page:
This sample app combines several of those techniques in a single app so that developers can learn where/how to creatively alert users when app updates are available to their workspace. In this way, workspaces can be updated quicker and more effectively rather than lagging behind the latest release and requiring support to understand why/how to access new features.
Adam Marinelli also supplied some extra context about the demo app via our shared Slack channel:
While the app is rather basic, and the "detection" of an outdated install is rather basic, using only auth.test, the main purpose was the show the UI indicator in the Slack client prompting users to update. Such as in the app home, as Context blocks at the bottom of notifications, and in modals and slash command responses. And in an external site like GitLab's integrations settings.
The proposal is currently left open because we should discuss the options for how we could prompt a user.