Connect GitHub

This workflow applies when GITHUB_AUTH_MODE is delegated or hybrid.

  1. Run /knowledge connect.

  2. Open the returned short-lived authorization link. The service validates its signed random state before redirecting to GitHub.

  3. Authorize the GitHub App. The callback consumes the state once, exchanges the code, encrypts the access and refresh tokens, and binds them to your Slack user ID.

  4. Close the success page. Slack also receives an ephemeral confirmation when its response URL remains valid.

  5. Run /knowledge status to see the connected GitHub login.

Run /knowledge disconnect to revoke the stored binding and attempt token revocation. Tokens are never displayed in Slack. A missing configuration produces “GitHub authorization is not configured”; expired or reused state produces “Invalid or expired OAuth state.” Repository permission and allowlisting are checked separately when publishing. See GitHub authorization.