Why this exists
Fluxer’s self-hosted SSO configuration expects a single OIDC provider. If you want to offer both Discord and GitHub sign-in, the simplest shape is a broker that presents both providers and speaks one OIDC issuer back to Fluxer. The repo includes a Cloudflare Worker app for this underfluxer_oidc_broker/.
What the broker does
- Publishes
/.well-known/openid-configurationandjwks.json - Accepts Fluxer’s authorization-code + PKCE flow
- Shows a provider picker for Discord and GitHub
- Exchanges the upstream OAuth code and fetches verified email claims
- Returns OIDC
access_token,id_token, anduserinfo - Stores short-lived broker state and single-use auth codes in Workers KV
Worker deployment shape
The Worker lives influxer_oidc_broker/ and expects:
- one KV namespace bound as
OIDC_BROKER_KV - one downstream OIDC client for Fluxer itself
- one RSA signing key in JWK form
- one Discord OAuth app
- one GitHub OAuth app
Required worker vars
Downstream Fluxer client
OIDC_ISSUEROIDC_CLIENT_IDOIDC_CLIENT_SECRETOIDC_ALLOWED_REDIRECT_URISOIDC_PRIVATE_JWK
Branding and policy
OIDC_BRAND_NAMEOIDC_ALLOWED_EMAIL_DOMAINSOIDC_DEFAULT_PROVIDER
Discord
DISCORD_CLIENT_IDDISCORD_CLIENT_SECRET
GitHub
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRET
Upstream callback URLs
Register these callback URLs in the upstream OAuth apps:- Discord:
https://YOUR_ISSUER/callback/discord - GitHub:
https://YOUR_ISSUER/callback/github
Fluxer admin SSO settings
Set Fluxer’s SSO config to point at the broker issuer.- Issuer:
https://YOUR_ISSUER - Client ID:
OIDC_CLIENT_ID - Client Secret:
OIDC_CLIENT_SECRET - Scope:
openid email profile
Generate the signing key
Fromfluxer_oidc_broker/:
OIDC_PRIVATE_JWK.
Create the KV namespace
fluxer_oidc_broker/wrangler.toml.