Fix OIDC email: load Authelia profile from UserInfo

Auth.js OIDC only reads ID-token claims by default; Authelia puts
email on UserInfo. Set idToken:false, harden claim extraction, and
document an optional Authelia claims_policy.
This commit is contained in:
Cursor Agent
2026-08-24 04:25:50 +00:00
parent c33f651cfe
commit 96c6df2fff
4 changed files with 83 additions and 16 deletions
+20 -2
View File
@@ -67,8 +67,26 @@ Open http://localhost:3000 and sign in.
6. Open `/login` — you should see **Sign in with AtlasHorizon**.
Notes:
- `AUTH_OIDC_ISSUER` must match discovery (`{issuer}/.well-known/openid-configuration`). Your AtlasHorizon issuer at `https://auth.atlashorizon.net` is valid.
- The IdP must return an **email** claim (we request `openid email profile`).
- `AUTH_OIDC_ISSUER` must match discovery (`{issuer}/.well-known/openid-configuration`).
- The app requests `openid email profile` and loads profile from **UserInfo** (Authelia puts `email` there by default).
- Optional Authelia hardening — also put email on the ID token:
```yaml
identity_providers:
oidc:
claims_policies:
rfiddb:
id_token:
- 'email'
- 'email_verified'
- 'preferred_username'
- 'name'
clients:
- client_id: 'rfiddb'
claims_policy: 'rfiddb'
# ...rest of client...
```
- Local password login stays available alongside SSO.
- If the button is missing, you are almost certainly on an old image — rebuild.