GitHub integration issues: token expired + need to change the base URL #75360
Replies: 4 comments
-
|
Thanks for posting in the GitHub Community, @FVenneri ! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Projects and Issues category is solely related to conversations around the GitHub products Issues and Projects. I've gone ahead and moved it for you. Good luck! |
Beta Was this translation helpful? Give feedback.
-
|
This answer worked for me: https://github.com/orgs/community/discussions/84162#discussioncomment-12575528
(I DMed that to the app and it worked for me) |
Beta Was this translation helpful? Give feedback.
-
|
It looks like you are running into two separate issues: 1- The expired authentication window for the Slack → GitHub authorization flow 2- Configuring the GitHub for Slack app to work with an enterprise or custom-domain GitHub instance (e.g., github.whatever.com) Below is the recommended approach to resolve both: 1/- Fixing the “Time window to connect your GitHub account has expired” error This message is generated by the GitHub for Slack OAuth flow. The authorization link generated inside Slack has a limited lifetime, and once it expires, GitHub will continue returning the error even if you retry from the same link. To reset the flow completely, you must do all of the following: 1- Return to Slack and open the GitHub app’s configuration. 2- In Slack, run: /github signin or open GitHub → Settings → Configure from the Slack sidebar. 3- Sign out inside the GitHub Slack app if the option is shown. 4- Trigger a new sign-in flow from Slack. 5- If you are using two GitHub accounts (company + personal), confirm that the browser session is signing into the correct one, or open the link in a private/incognito window to avoid cached sessions. This forces Slack to generate a new, valid OAuth request. Reusing the old one will always produce the expiration message, no matter how many times you retry. 2/- Using a custom GitHub Enterprise URL (e.g., github.whatever.com) The GitHub for Slack app only connects to the GitHub instance that your workspace administrator has configured. To do this: 1- Your Slack Workspace Admin or GitHub Enterprise Admin must access: 2- During setup, they must select: 3- Enter the base URL of your enterprise GitHub instance (e.g., https://github.whatever.com). 4- The Slack app must be granted permission to communicate with your GHES instance (/api/v3 must be reachable from Slack’s IP ranges). 5- After the admin configures the enterprise instance, users can sign in normally using their company accounts. If this step is not performed, Slack will always attempt to connect to github.com, and no amount of reconnecting on your side will fix the mismatch. |
Beta Was this translation helpful? Give feedback.
-
|
It sounds like there are two separate issues here, so here’s how you can resolve both:
This message comes from the Slack GitHub app. In Slack → open the GitHub app → click “Sign in” or “Connect GitHub account” again. If you’re still stuck in a loop, try these: Remove the GitHub app from Slack and re-install it. Clear your browser session or try an incognito/private window. Make sure you’re logged into the correct GitHub account before starting the connection flow. The error itself cannot be “unblocked” manually; you must restart the authentication from Slack.
If your company uses GitHub Enterprise Server, then you must install and configure the GitHub + Slack app for Enterprise Server, which uses a different base URL. You cannot change the URL inside the standard Slack GitHub app. To integrate Slack with your company’s GitHub Enterprise Server: Follow the official Enterprise Server setup instructions here: Your company’s GitHub admin must configure the Slack app and approve the connection using your Enterprise URL (e.g., github.company.com). Only the admin of your Enterprise instance can set this up — it’s not something that can be changed from the user side. Summary The expired-token message means you must restart sign-in from Slack. The standard Slack GitHub app does not support custom GitHub Enterprise URLs. You need your company’s GitHub admin to install the Enterprise Server-compatible Slack GitHub app. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
General
Feature Area
Issues
Body
Hello, I think that this is the best suited place to ask this: I'm trying to add the integration with the company repositories but I'm facing issues (I'm having issue in the company GitHub, with another account, but it redirects me here and I need to use my personal one): have downloaded the app, and as the setup required time while I was busy, I have postponed the registration. And now it says:
"Error: The time window to connect your GitHub account has expired. Please return to Slack to re-start the process of connecting your GitHub account."
Whatever I do, nothing changes and I always get this message.
Other than unblocking this, I need to understand how to change the base URL for the company repositories from www.github.com to github.whatever.com; how do I do that?
I need to solve both to being able to continue...
The app I'm talking about is this: https://slack.github.com/.
Thanks!
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions