From ce0b6693482712754b793a51c0117920f1d82100 Mon Sep 17 00:00:00 2001 From: Naveen Prashanth <78990165+gnpaone@users.noreply.github.com> Date: Sun, 11 May 2025 19:24:55 +0530 Subject: [PATCH] Update Identifier function to not risk normalization that changes existing keys --- hscontrol/types/users.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hscontrol/types/users.go b/hscontrol/types/users.go index 471cb1e5..a509ed8e 100644 --- a/hscontrol/types/users.go +++ b/hscontrol/types/users.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "net/mail" - "net/url" "strconv" "strings" @@ -195,12 +194,9 @@ type OIDCClaims struct { } func (c *OIDCClaims) Identifier() string { - if strings.HasPrefix(c.Iss, "http") { - if i, err := url.JoinPath(c.Iss, c.Sub); err == nil { - return i - } - } - return c.Iss + "/" + c.Sub + trimmedIss := strings.TrimRight(c.Iss, "/") + trimmedSub := strings.TrimLeft(c.Sub, "/") + return trimmedIss + "/" + trimmedSub } type OIDCUserInfo struct {