private async Task <bool> IsRefreshTokenValid(Guid id)
        {
            var refreshToken = await _repository.GetRefreshTokenAsync(id);

            if (refreshToken == null)
            {
                return(false);
            }

            var exists  = refreshToken != null;
            var expired = refreshToken.IsExpired;

            return(exists && !expired);
        }