Auto Tournament
Sign-in

GitHub

Turn on Sign in with GitHub.

Users sign in with their GitHub account. Auto Tournament asks GitHub only for the read:user scope, which is read access to the public profile. See Sign-in providers for how accounts and admin access work.

Create a GitHub OAuth app

  1. On GitHub, click your profile picture at the top right, then Settings.
  2. In the left menu, click Developer settings at the bottom, then OAuth Apps.
  3. Click New OAuth App. If you have no OAuth apps yet, the button is called Register a new application.
  4. Fill in the form:
    • Application name: for example Auto Tournament. Users see this name when they sign in.
    • Homepage URL: your FRONTEND_BASE_URL, for example https://tournament.example.com.
    • Authorization callback URL: see the next step.
    • Leave Enable Device Flow off.
  5. Click Register application.
  6. Copy the Client ID.
  7. Click Generate a new client secret and copy the secret. GitHub shows it only once.

To own the app as an organization instead, open the organization, then Settings > Developer settings > OAuth Apps.

Set the callback URL

In Authorization callback URL, enter:

FRONTEND_BASE_URL/api/auth/github/callback

For example https://tournament.example.com/api/auth/github/callback. If you already registered the app, change it on the app's page and click Update application.

Turn it on in Auto Tournament

In Settings → Sign-in → GitHub, paste the Client ID and Client Secret, turn it on and save. The callback URL to register is shown there with a copy button. The Sign in with GitHub button appears on the login page right away.

Prefer environment variables? Set AUTH_GITHUB_ENABLED=true, GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET and restart. They are imported once.

Test the button

  1. Open FRONTEND_BASE_URL/login in a private browser window.
  2. Click Sign in with GitHub and click Authorize on GitHub.
  3. You are signed in. Someone new gets an account of their own when registration is open (Settings → Players & Access). Steam can be linked later on /me/connections.

If GitHub shows "The redirect_uri is not associated with this application", the callback URL in step 2 does not match FRONTEND_BASE_URL exactly.

On this page