fix: remove empty RefreshTokens

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh 2021-01-25 14:53:19 +04:00
parent b2e9f67edc
commit a7667dff38

View File

@ -291,9 +291,7 @@ func (d dexAPI) ListRefresh(ctx context.Context, req *api.ListRefreshReq) (*api.
if err == storage.ErrNotFound { if err == storage.ErrNotFound {
// This means that this user-client pair does not have a refresh token yet. // This means that this user-client pair does not have a refresh token yet.
// An empty list should be returned instead of an error. // An empty list should be returned instead of an error.
return &api.ListRefreshResp{ return &api.ListRefreshResp{}, nil
RefreshTokens: nil,
}, nil
} }
d.logger.Errorf("api: failed to list refresh tokens %t here : %v", err == storage.ErrNotFound, err) d.logger.Errorf("api: failed to list refresh tokens %t here : %v", err == storage.ErrNotFound, err)
return nil, err return nil, err