From 755a600418786a79ed192fc9b2aa587a8475a2b4 Mon Sep 17 00:00:00 2001 From: Arzumify Date: Wed, 2 Oct 2024 17:52:47 +0100 Subject: [PATCH] Made the tokens contain the actual sub Signed-off-by: Arzumify --- services-src/auth/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services-src/auth/main.go b/services-src/auth/main.go index 0e6e081..fcc039f 100644 --- a/services-src/auth/main.go +++ b/services-src/auth/main.go @@ -1125,7 +1125,7 @@ func Main(information library.ServiceInitializationInformation) { } openIDTemplate := jwt.MapClaims{ - "sub": userId, + "sub": uuid.Must(uuid.FromBytes(userId)).String(), "iss": hostName, "name": username, "aud": appId, @@ -1154,6 +1154,7 @@ func Main(information library.ServiceInitializationInformation) { "nonce": nonce, "aud": appId, "isOpenID": false, + "sub": uuid.Must(uuid.FromBytes(userId)).String(), } accessToken := jwt.NewWithClaims(jwt.SigningMethodEdDSA, accessTokenTemplate)