GitHub#
Lets people sign in with their GitHub account. GitHub uses OAuth 2 rather than OpenID Connect, so leptoskit reads who they are from GitHub's API. Last checked against GitHub's documentation on 30 October 2026.
Set it up#
Run
leptoskit auth provider add github. It adds:[auth.providers.github] client_id_env = "GITHUB_CLIENT_ID" client_secret_env = "GITHUB_CLIENT_SECRET"In GitHub's developer settings, create a new OAuth App with the authorization callback URL
https://myapp.com/auth/callback/github. An OAuth App takes one callback URL, so create a second app for development, withhttp://localhost:3000/auth/callback/github.Generate a client secret.
Set
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET.Turn on the
auth-providersfeature, and runleptoskit auth doctor.
What sign-in gets#
The person's numeric GitHub ID, which never changes, their username and name, and their primary email address, with GitHub's verified flag. leptoskit asks for the read:user and user:email scopes, since a person's primary address may be private.
Platforms#
It works on the web, and in iOS, macOS, and Android apps through the system browser, with the same redirect URIs: the browser comes back to your site, which sends it on to the app. See Sign-in for each platform.