Installing an app and logging a user in

I’ve tried this a bunch of ways and I’m assuming it’s just not possible. If I have an app that’s managedon my website, the flow I currently have is…

  1. The user is on my site, they click login with GitHub
  2. They’re directed to GitHub and authorize via OAuth (using the App Oauth credentials)
  3. They get directed back to my site where I can store their token/email etc.
  4. Then prompt them to install the app
  5. They’re directed back to GitHub to approve access to organisation(s) and it’s repos
  6. The come back to my site and I can pair their Installation ID to their account.

This seems super long winded and complicated flow for most users, I was hoping I’d be able to authorize the user at the same time as installing the app but I can’t see how.

Is there a workaround for this or accepted approach to reduce these steps and make the process cleaner for users, while still getting an Installation ID and the current user token?