GitHub App to have dynamic callbacks after user install it #171046
Replies: 4 comments 1 reply
-
| Hi @yoav-hizki, You've stumbled upon a pretty common snag when building GitHub Apps, it's a real "gotcha" moment for a lot of developers. You want a smooth experience for your users, sending them right back to where they started, and it feels like the system should just allow that. Well, you’re spot on about the limitation. The multiple callback feature is, unfortunately, a perk reserved for OAuth apps. For installations, that single, static  Now, here's the good news: while the feature isn't built-in, what you want is completely achievable with a clever little workaround. The trick involves a handy tool called the  Here’s how we can make it work: First, before you even send the user to GitHub, you need to do a couple of quick things on your page. Let's say the user is on  
 Then, when you create the link to send them to GitHub to install the app, you just attach that unique code to the URL. Next, GitHub takes over. The user goes through the installation process. The great part is that GitHub will hold onto your  Finally. After the installation is complete, GitHub sends the user back to your single, predefined  So, on your server, in that  
 And just like that, they’re seamlessly dropped right back at  It involves a few extra steps on your end, but it’s the standard, rock-solid way to solve this exact problem. | 
Beta Was this translation helpful? Give feedback.
-
| You can’t set truly dynamic callbacks for installation flows. 
 So you’ll need to handle the routing logic yourself after GitHub sends them back. | 
Beta Was this translation helpful? Give feedback.
        
          
            
              This comment was marked as spam.
            
          
            
        
      
    
            
              This comment was marked as spam.
            
          
            
        -
| 🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as  2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the  Thank you for helping bring this Discussion to a resolution! 💬 | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hi,
When a user installs my GH App, I want them to be redirected to the page they came from. That is possible by setting the callback field, but I have multiple domains where I expect my users to install the app from, and I would like to redirect each of them back to the domain they came from.
Is that possible? From what I understand, the multiple callbacks feature only works on authentication, not installation.
Can you guys help out here, please?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions