Skip to content

GitHub Apps OAuth

Tinyauth supports GitHub Apps for authentication instead of OAuth Apps. GitHub Apps allow for more control over permissions and are slightly more complex to set up. For simpler setups, OAuth Apps are recommended.

GitHub requires the following to set up an app:

  • A domain name (non-gTLDs are supported)
  • A GitHub account

Open the GitHub Apps site and click New GitHub App.

Then, fill in the following information:

NameValue
GitHub App NameThe name for the app, e.g., Tinyauth.
Homepage URLAny URL, e.g., https://tinyauth.app.
Callback URLThe Tinyauth app URL followed by /api/oauth/callback/github, e.g., https://tinyauth.example.com/api/oauth/callback/github.

GitHub New App Screen

Under webhook, ensure the Active checkbox is unchecked since webhooks are not required.

In the Permissions section, click Account permissions and set the Email Addresses option to Read-only:

GitHub Emails Section

Finally, create the app. The following screen will appear:

GitHub App Home

Note the client ID. To generate the client secret, click Generate new client secret. After authentication, the secret will appear:

GitHub Client Secret

Note down the client ID and secret as they will be required for Tinyauth.

Add the following environment variables to the Tinyauth Docker container:

services:
tinyauth:
environment:
- TINYAUTH_OAUTH_PROVIDERS_GITHUB_CLIENTID=your-github-client-id
- TINYAUTH_OAUTH_PROVIDERS_GITHUB_CLIENTSECRET=your-github-secret

Restart Tinyauth. Upon visiting the login screen, an additional option to log in with GitHub will appear.