feat: forward sub from oidc providers (#543)

* feat: forward sub from oidc providers

* fix: review comments
This commit is contained in:
Stavros
2025-12-26 19:02:51 +02:00
committed by GitHub
parent 2d8af0510e
commit 43487d44f7
12 changed files with 21 additions and 13 deletions

View File

@@ -79,6 +79,7 @@ const DefaultNamePrefix = "TINYAUTH_"
// OAuth/OIDC config
type Claims struct {
Sub string `json:"sub"`
Name string `json:"name"`
Email string `json:"email"`
PreferredUsername string `json:"preferred_username"`
@@ -125,6 +126,7 @@ type SessionCookie struct {
TotpPending bool
OAuthGroups string
OAuthName string
OAuthSub string
}
type UserContext struct {
@@ -138,6 +140,7 @@ type UserContext struct {
OAuthGroups string
TotpEnabled bool
OAuthName string
OAuthSub string
}
// API responses and queries