GoDoxy
Getting Started

OpenID Connect (OIDC)

Configure OIDC authentication for GoDoxy and per-application middleware

Overview

OIDC allows users to authenticate using an external identity provider (IdP) such as Authentik, Pocket ID, or Azure AD. Use it for:

  • WebUI Authentication - Single sign-on for the dashboard
  • Per-Application Middleware - Protect individual routes with OIDC

Environment Variables

VariableDescriptionDefault
GODOXY_OIDC_ISSUER_URLOIDC issuer URLempty
GODOXY_OIDC_CLIENT_IDOIDC client IDempty
GODOXY_OIDC_CLIENT_SECRETOIDC client secretempty
GODOXY_OIDC_ALLOWED_USERSAllowed users listempty
GODOXY_OIDC_ALLOWED_GROUPSAllowed groups listempty
GODOXY_OIDC_SCOPESOIDC scopesopenid,profile,email,groups
GODOXY_OIDC_RATE_LIMITRate limit10
GODOXY_OIDC_RATE_LIMIT_PERIODRate limit period1s

Scopes

ScopeDescriptionRequired
openidOpenID ConnectYes
profileUser profileYes
emailUser emailNo
groupsUser groupsNo
offline_accessRefresh tokenNo

Callback URL

Add this callback URL to your IdP:

https://*.yourdomain.com/auth/callback

Or for regex-based configuration:

https:\/\/([^\.]+)\.yourdomain\.com\/auth\/callback

Provider-Specific Configuration

Authentik

  1. Set Signing Key to "authentik Self-signed Certificate"
  2. Set Encryption Key to None
  3. Set Issuer mode to "Each provider has a different issuer, based on the application slug"
  4. Add scope: authentik default OAuth Mapping: OpenID 'offline_access'

Example Configuration

OIDC Configuration

OIDC Tokens

Add these to .env:

VariableDescriptionExample
GODOXY_OIDC_ISSUER_URLIdP base URLhttps://id.domain.com (Pocket ID) or https://auth.domain.com/application/o/<slug>/ (Authentik)
GODOXY_OIDC_CLIENT_IDClient IDyour-client-id
GODOXY_OIDC_CLIENT_SECRETClient secretyour-client-secret
GODOXY_OIDC_ALLOWED_USERSAllowed usersuser1,user2
GODOXY_OIDC_ALLOWED_GROUPSAllowed groupsgroup1,group2

Per-Application OIDC Middleware

Protect individual routes with OIDC authentication using Docker labels:

The OIDC middleware only processes GET requests. Non-GET requests and WebSocket connections are blocked with a 403 Forbidden response.

services:
  app:
    labels:
      # Enable OIDC middleware
      proxy.#1.middlewares.oidc:

See OIDC Middleware for advanced configuration options.

On this page