code: 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();
      }
docs: On a Resource owner error
  
  @param IdentityProviderException $e