package components import ( "crypto/md5" "fmt" "strings" "html/template" "github.com/zitadel/oidc/v3/pkg/oidc" openid "github.com/zitadel/zitadel-go/v3/pkg/authentication/oidc" ) var GravatarTemplate = template.Must(template.New("gravatar").Parse("
")) func GetGravatarURL(email string, size uint) string { email = strings.TrimSpace(strings.ToLower(email)) hash := md5.Sum([]byte(email)) gravatarURL := fmt.Sprintf("https://www.gravatar.com/avatar/%x?s=%d", hash, size) return string(templ.URL(gravatarURL)) } templ User(authCtx *openid.UserInfoContext[*oidc.IDTokenClaims, *oidc.UserInfo]) {