Skip to main content

Getting Started

Configure the Plugin

Enable the plugin in your traefik configuration.

experimental:
plugins:
traefik-oidc-auth:
moduleName: "github.com/sevensolutions/traefik-oidc-auth"
version: "v0.3.2"

Configure Middleware

http:
services:
whoami:
loadBalancer:
servers:
- url: http://whoami:80

middlewares:
oidc-auth:
plugin:
traefik-oidc-auth:
Provider:
Url: "https://<YourIdentityProviderUrl>"
ClientId: "<YourClientId>"
ClientSecret: "<YourClientSecret>"
#UsePkce: true # Or use PKCE if your Provider supports this
Scopes: ["openid", "profile", "email"]

routers:
whoami:
entryPoints: ["web"]
rule: "HostRegexp(`.+`)"
service: whoami
middlewares: ["oidc-auth"]