Files
coreapp-dev/templates/sso
davidandClaude Opus 5.5 dca8837487 The Core's admin account is always an admin of the app
Every app's .env gets CORE_ADMIN_EMAIL (admin@<domain>, the Core's own
admin, as Federated's apps use). The skill says apps make that account an
admin on each Core sign-in, trusting only Authelia's email, instead of a
setup link; the sso example apps show the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:34:36 -07:00
..

## Sign-in

`needs = ["sso"]`: people sign in with their Core account, through the
Core's Authelia (OpenID Connect, authorization code flow with PKCE).

- At install, the client `coreapp-{{NAME}}` is registered in Authelia, with
  the random `OIDC_CLIENT_SECRET` from `.env`. `coreapp remove` removes it.
- Its redirect URI is `https://{{NAME}}.<domain>/auth/callback`, so the app
  has to handle that path.
- Authelia decides whether a second factor is needed (the Core's 2FA
  policy).
- `oidc.py` does the whole flow with Python's standard library, and `app.py`
  uses it for `/login`, `/auth/callback` and `/logout`. For a real app, use
  your framework's OpenID Connect library with `OIDC_ISSUER`,
  `OIDC_CLIENT_ID` and `OIDC_CLIENT_SECRET`.