feat: add email_verified claim

This commit is contained in:
Elias Schneider
2024-10-25 21:33:54 +02:00
parent bd4f87b2d2
commit 5565f60d6d
10 changed files with 64 additions and 29 deletions

View File

@@ -41,6 +41,11 @@ var defaultDbConfig = model.AppConfig{
Type: "number",
Value: "60",
},
EmailsVerified: model.AppConfigVariable{
Key: "emailsVerified",
Type: "bool",
Value: "false",
},
BackgroundImageType: model.AppConfigVariable{
Key: "backgroundImageType",
Type: "string",

View File

@@ -315,6 +315,7 @@ func (s *OidcService) GetUserClaimsForClient(userID string, clientID string) (ma
if strings.Contains(scope, "email") {
claims["email"] = user.Email
claims["email_verified"] = s.appConfigService.DbConfig.EmailsVerified.Value == "true"
}
if strings.Contains(scope, "groups") {