You can allow users to sign in to your Rocket.Chat workspace with their GitHub accounts. Setup involves alternating between GitHub and your Rocket.Chat admin panel, so keep both open in separate tabs.
Prerequisites
A GitHub account with permission to create OAuth apps
Administrator access to your Rocket.Chat workspace
Step 1: Create a GitHub OAuth app
Go to GitHub Developer Settings.
Select OAuth Apps → New OAuth App.
Enter the required app details. You will provide the Authorization callback URL in Step 3.
Select Register application.
On the app page, copy the Client ID and select Generate a new client secret.
The Client Secret is shown only once at the moment of generation. Copy it immediately and store it somewhere safe. If you navigate away without copying, you must generate a new secret and update Rocket.Chat with the new value.
Leave this page open. You will return to it in Step 3.
Step 2: Get the callback URL from Rocket.Chat
Sign in to your Rocket.Chat workspace as an administrator.
Go to Manage → Workspace → Settings → OAuth.
Expand the GitHub section.
Copy the value of Github Callback URL. It looks like
https://your-domain/_oauth/github.
Step 3: Add the callback URL to your GitHub OAuth app
Return to your GitHub OAuth app page.
Paste the callback URL you copied from Rocket.Chat into the Authorization callback URL field.
Select Update application.
The Authorization callback URL in GitHub and the callback URL in Rocket.Chat must match exactly, including the scheme and any trailing path. A mismatch typically does not produce an error on GitHub's side, but sign-in will fail at Rocket.Chat with
No matching login attempt found.
Step 4: Configure GitHub OAuth in Rocket.Chat
Back in Rocket.Chat, in the same OAuth section, expand GitHub.
Turn OAuth Enabled on.
Enter the following values:
Client Id: the Client ID from your GitHub OAuth app
Client Secret: the Client Secret from your GitHub OAuth app
Select Save changes.
Verify the setup
Sign out of your workspace.
On the sign-in page, confirm that the Sign in with GitHub button appears.
Select it and complete the GitHub sign-in flow. You should be returned to your workspace and signed in.
Troubleshooting
Sign-in fails with No matching login attempt found
No matching login attempt foundThe Authorization callback URL in GitHub and the callback URL in Rocket.Chat are not identical. Re-copy the value from Rocket.Chat and paste it into GitHub exactly as shown, including the scheme.
The Sign in with GitHub button does not appear
Confirm that OAuth Enabled is on in the GitHub section, that Client Id and Client Secret are filled in, and that you saved changes. A hard refresh of the sign-in page may be needed.