protected function facebook(Oauth2Service\Facebook $facebook, TokenInterface $token)
    {
        $user = json_decode($facebook->request('/me'), true);

        $loginRequest = new LoginRequest(
            'facebook',
            $user['id'],
            $token->getAccessToken(),
            $token->getEndOfLife() > 0 ? $token->getEndOfLife() : 0,
            $token->getRefreshToken(),
            [$user['email']]
        );

        return $loginRequest;
    }