From 7563affc64c6270454e2174c2032523095993956 Mon Sep 17 00:00:00 2001 From: icey-yu <119291641+icey-yu@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:28:57 +0800 Subject: [PATCH] fix: Add a lead time for the token's issuance time. (#2914) --- internal/rpc/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index c9cf8d345..987ccd4ac 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -130,7 +130,7 @@ func (s *authServer) GetUserToken(ctx context.Context, req *pbauth.GetUserTokenR func (s *authServer) parseToken(ctx context.Context, tokensString string) (claims *tokenverify.Claims, err error) { claims, err = tokenverify.GetClaimFromToken(tokensString, authverify.Secret(s.config.Share.Secret)) if err != nil { - return nil, errs.Wrap(err) + return nil, err } isAdmin := authverify.IsManagerUserID(claims.UserID, s.config.Share.IMAdminUserID) if isAdmin {