protected function onOAuthError($errorCode)
    {
        $errorCode = strlen($errorCode > 100) ? substr($errorCode, 0, 100) : $errorCode;

        $this->logger->notice(
            "OAuth2 error response: code {code}, provider {provider}",
            array(
                "code" => $errorCode,
                "provider" => get_class($this->provider),
            )
        );

        $this->session->addFlash("error", "The provider returned an error ($errorCode)");
        $this->picoAuth->redirectToLogin();
    }