fix: token update

Signed-off-by: Gordon <1432970085@qq.com>
This commit is contained in:
Gordon
2023-07-26 17:51:55 +08:00
parent ac14dd0249
commit 49220ccfbf
15 changed files with 46 additions and 39 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ package controller
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/authverify"
"github.com/golang-jwt/jwt/v4"
@@ -60,7 +61,7 @@ func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformI
}
var deleteTokenKey []string
for k, v := range tokens {
_, err = tokenverify.GetClaimFromToken(k)
_, err = tokenverify.GetClaimFromToken(k, authverify.Secret())
if err != nil || v != constant.NormalToken {
deleteTokenKey = append(deleteTokenKey, k)
}