feat: Add "sub" claim for the openid scope

Required by OIDC clients like Gitea
comfy
Peter Cai 1 month ago
parent 7de5f11bcc
commit 20ad51f214

@ -57,6 +57,8 @@ func UserInfo(ctx *gin.Context) {
for _, s := range scopes {
if value, ok := (*userinfo)[s]; ok {
userinfoRes[s] = value
} else if s == "openid" {
userinfoRes["sub"] = *tokenInfo.Sub
}
}
}

Loading…
Cancel
Save