@@ -49,6 +49,7 @@ type ClaimSet struct {
4949 Exp int64 `json:"exp"`
5050 Name string `json:"name,omitempty"`
5151 Email string `json:"email,omitempty"`
52+ EmailVerified bool `json:"email_verified,omitempty"`
5253 PreferredUsername string `json:"preferred_username,omitempty"`
5354 Groups []string `json:"groups,omitempty"`
5455 Nonce string `json:"nonce,omitempty"`
@@ -60,6 +61,7 @@ type UserinfoResponse struct {
6061 Email string `json:"email,omitempty"`
6162 PreferredUsername string `json:"preferred_username,omitempty"`
6263 Groups []string `json:"groups,omitempty"`
64+ EmailVerified bool `json:"email_verified,omitempty"`
6365 UpdatedAt int64 `json:"updated_at"`
6466}
6567
@@ -388,6 +390,7 @@ func (service *OIDCService) generateIDToken(client config.OIDCClientConfig, user
388390 Exp : expiresAt ,
389391 Name : userInfo .Name ,
390392 Email : userInfo .Email ,
393+ EmailVerified : userInfo .EmailVerified ,
391394 PreferredUsername : userInfo .PreferredUsername ,
392395 Groups : userInfo .Groups ,
393396 Nonce : nonce ,
@@ -583,6 +586,8 @@ func (service *OIDCService) CompileUserinfo(user repository.OidcUserinfo, scope
583586
584587 if slices .Contains (scopes , "email" ) {
585588 userInfo .Email = user .Email
589+ // We can set this as a configuration option in the future but for now it's a good idea to assume it's true
590+ userInfo .EmailVerified = true
586591 }
587592
588593 if slices .Contains (scopes , "groups" ) {
0 commit comments