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
- On GitHub, click your profile picture at the top right, then Settings.
- In the left menu, click Developer settings at the bottom, then OAuth Apps.
- Click New OAuth App. If you have no OAuth apps yet, the button is called Register a new application.
- 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 examplehttps://tournament.example.com. - Authorization callback URL: see the next step.
- Leave Enable Device Flow off.
- Application name: for example
- Click Register application.
- Copy the Client ID.
- 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/callbackFor 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
- Open
FRONTEND_BASE_URL/loginin a private browser window. - Click Sign in with GitHub and click Authorize on GitHub.
- 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.