mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
feat: add email_verified claim
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user