Skip to content

Commit

Permalink
fix: api.v2.UserService/ListUserAccessTokens too many access tokens c…
Browse files Browse the repository at this point in the history
…ause browser broken
  • Loading branch information
whatwewant committed Apr 7, 2024
1 parent 31b8628 commit 7476792
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/route/api/v2/user_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, request *apiv2p
return nil, status.Errorf(codes.Internal, "failed to list access tokens: %v", err)
}

// limit only the first 20 access tokens.
if len(userAccessTokens) > 20 {
userAccessTokens = userAccessTokens[:20]
}

accessTokens := []*apiv2pb.UserAccessToken{}
for _, userAccessToken := range userAccessTokens {
claims := &auth.ClaimsMessage{}
Expand Down

0 comments on commit 7476792

Please sign in to comment.