A lightweight, zero-dependency OIDC identity gateway for Open WebUI, enabling employee ID single sign-on (SSO) and admin approval workflows.
- OIDC 1.0 Provider: Implements Discovery, Authorize, Token (JWT), and UserInfo endpoints.
- Employee ID Auth: Maps internal employee IDs to OIDC identities with generated virtual emails.
- Access Control: Built-in registration, password management, and admin approval/deletion workflow.
- CGO-Free: Built with
modernc.org/sqlitefor effortless cross-compilation.
Copy .env.example to .env and adjust the environment variables:
PORT=3090
COMPANY_NAME=企业 AI 智能助手
JWT_SECRET=super_secret_oidc_key_2026
OPENWEBUI_URL=http://192.168.1.220:3080
ADMIN_PASSWORD=admin123
FAKE_EMAIL_DOMAIN=compant.local
HOST_IP=192.168.1.220go run cmd/server/main.goCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o oidc-gateway cmd/server/main.go- Login Page:
http://<HOST>:3090/login - Admin Panel:
http://<HOST>:3090/admin - Change Password:
http://<HOST>:3090/change-password - Discovery:
http://<HOST>:3090/.well-known/openid-configuration - Authorize:
http://<HOST>:3090/oauth/authorize - Token:
http://<HOST>:3090/oauth/token - UserInfo:
http://<HOST>:3090/oauth/userinfo