Redirect after re-authorizing the app

Hi,

Our team found several cases when working with Github Apps more problematic compared to OAuth Apps. For all of them, the source of the problem is that it is not possible to get users redirected back to the original auth page after they authorized and choose an existing Github app installation on the https://github.com/apps/<app-name>/installations/new page.

The story: our system allows users to have one or more workspaces where they can add GitHub integrations to get information about their repositories to analyze. Users might want to authorize our Github App for the same Github owner (user or organization) in different workspaces. Also, they can just accidentally remove existing authorization and just want to restore it in our app.

Here is where the problem comes in - when the Github App is already installed for an owner we cannot find a way to identify that on our side because Github provides a link to the app configuration page and never returns the user back to our app.

How the problem could be solved for our cases?

If that is not possible, then I would call this behavior backward-incompatible because the previously used OAuth app always redirected users back, no matter did they installed the app previously or not.

Thanks