To keep a fairly long story short we’ve created a Custom App that allows us to create issues and sync comments in GitHub; this is so we can keep our developers working in GitHub and they won’t need to work with multiple systems. To achieve this we’ve created our own Custom App for fresh desk which uses the oAuth2.0 flow from GitHub to authenticate with the API.
During development we already faced some issues with the redirect_uri or callback URL as GitHub calls it. After some debugging and sifting through the requests done during authentication we figured out that GitHub wants to know the expected GET parameters, so
http://localhost:10001/auth/callback
→ http://localhost:10001/auth/callback?callback=http://localhost:10001/custom_configs?oauth=github&product=modules
.
Once this was updated everything worked fine during local development.
Now when we try to upload the app to the market place and then attempt to install the application it appears to get stuck at the GitHub oAuth step once again. From what I can gather from the requests that are done it appears to do 5 steps related to the marketplace authentication/ installation and then the 6th requests should do the GitHub authentication; at least it does when installing the locally developed app. However this request gets stuck loading for a while and eventually ends up with a 504 gateway timeout.
These are the Callback urls mentioned in the requests done and the ones we’ve already attempted to add to GitHub:
- https://oauth.freshdev.io/auth/callback
- https://oauth-euc.freshdesk.com/product/1/account/3125128/versions/430341/oauth_install?callback=https%3A%2F%2F1-3125128.appgallery-euc.freshworks.com%2Fapps%2F191909%2F430341%2Foauth_callback&fdcode=Freshdesk+62ef1490ba016661841a5a1f94bebbad&oauth=default&extension_id=191909&organisation_id=702811502985203474
- https://1-3125128.appgallery-euc.freshworks.com/apps/191909/430341/oauth_callback&fdcode=Freshdesk+62ef1490ba016661841a5a1f94bebbad&oauth=default&extension_id=191909&organisation_id=702811502985203474
- https://oauth-euc.freshdesk.com/product/1/account/3125128/versions/430341/oauth_install
- https://1-3125128.appgallery-euc.freshworks.com/apps/191909/430341/oauth_callback
However even after all these attempts the 6th request still gets stuck.
TLDR; The callback url mentioned in the oAuth documentation doesn’t seem to match up with whatever GitHub wants causing the Custom App not to get past the installation.
Are we simply missing some GET parameters we need to add?