Traefik Forward Auth
GitHub

Google

To use Google 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 google property:

  • clientID : OAuth2 client ID of your application
  • clientSecret : OAuth2 client secret of your application

Full configuration example#

The following is a complete tfa-config.yaml example using Google 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 Google
      - google:
          clientID: "your-google-client-id.apps.googleusercontent.com"
          clientSecret: "your-client-secret"

Full list of configuration options for Google

Edit this page on GitHub