GitHub OAuth Setup

You can sign in to your Rocket.Chat workspace by enabling GitHub or GitHub Enterprise OAuth.

Prerequisites

  • A GitHub or GitHub Enterprise account.

  • A GitHub OAuth app and the client ID and secret.

    • If you don't have an app, go to your GitHub Developers Settings, navigate to OAuth Apps, and click New OAuth App.

    • Fill in the required information, including the Authorization callback URL, and save your app.

    • Your Client ID and a button to Generate a new client secret are now displayed. Click the button to generate a new client secret for your OAuth credentials. Copy both the client ID and the secret.

  • Retrieve the Authorization Callback URL from the GitHub tab in your Rocket.Chat workspace. You can find it in the GitHub Callback URL section.

  • If your callback URL is wrong, GitHub does not display any error. Instead of logging in, you receive an error message saying, No matching login attempt found.

Enable GitHub OAuth

  • Navigate to OAuth settings (Administration > Workspace > Settings > OAuth) in your workspace.

  • In the GitHub tab, enable OAuth and fill in the Client Id and Client Secret you copied earlier.

    • For GitHub Enterprise, add your Server URL also.

  • Click Save changes.

A Sign in with GitHub button appears on your workspace's login page. Users can now Sign in with GitHub by clicking that button!