protected function onOauthResourceError(IdentityProviderException $e)
    {
        $this->logger->critical(
            "OAuth2 IdentityProviderException: {e}, provider {provider}",
            array(
                "e" => $e->getMessage(),
                "provider" => get_class($this->provider),
            )
        );

        $this->session->addFlash("error", "Failed to get an access token or user details.");
        $this->picoAuth->redirectToLogin();
    }