GitHub
To use GitHub for user authentication, create an OAuth2 application and configure the callback to https://<endpoint>/portals/<portal>/oauth2/callback (see examples
depending on how Traefik Forward Auth is exposed).
Configure a provider with these options in the github property:
clientID: OAuth2 client ID of your applicationclientSecret: OAuth2 client secret of your application
Full configuration example#
The following is a complete tfa-config.yaml example using GitHub as the authentication provider.
# tfa-config.yaml
server:
# Domain(s) served by Traefik Forward Auth
# `domain` is the cookie domain (the domain where the app is reachable, or a parent domain)
# `authHost` is the public hostname of Traefik Forward Auth itself (omit it when using "sub-path" mode)
domains:
- domain: "example.com"
authHost: "auth.example.com"
portals:
- name: "main"
providers:
# Configure authentication with GitHub
- github:
clientID: "your-client-id"
clientSecret: "your-client-secret"