GitHub app installation problem with with multiple call back URLs

Hi, all.

Hope you are going well.

I have created a GitHub app with two call back URLs

  1. http://localhost:<my-port>/login.html
  2. https://www.mydomain.com/login

I have used https://github.com/login/oauth/authorize?client_id=<my-client-id>&redirect_uri=http://localhost:<my-port>/login.html&state=jhgrehehehruerheu'

for the development. Then after the authorization process it redirects to my 1st url above.

Until now it’s fine.

Now when I used https://github.com/apps/<my-app>/installations/new?state=jhgrehehehruerheu

to install the app, after installation it is redirecting to the 2nd url (https://www.mydomain.com/login)

How can I overcome this, I need to redirect to the specific url according to the environment when installation completes.

Is there any way to do so

Hoping with a positive response,

Regards, @Shiva-sandupatla