Controller/AdminController.php
public function revokeAction($name)
    {
        /* @var \Google_Client $client */
        $clientProvider = $this->get('happyr.google_site_authenticator.client_provider');
        $client = $clientProvider->getClient($name);

        $client->revokeToken();
        $clientProvider->setAccessToken(null, $name);

        $this->get('session')->getFlashbag()->add('msg', 'Token was revoked.');

        return $this->redirect($this->generateUrl('happyr.google_site_authenticator.index'));
    }
public function revokeAction($name)
    {
        /* @var \Google_Client $client */
        $clientProvider = $this->get('happyr.google_site_authenticator.client_provider');
        $client = $clientProvider->getClient($name);

        $client->revokeToken();
        $clientProvider->setAccessToken(null, $name);

        $this->get('session')->getFlashbag()->add('msg', 'Token was revoked.');

        return $this->redirect($this->generateUrl('happyr.google_site_authenticator.index'));
    }
public function revokeAction ( $ name ) { /* @var \Google_Client $client */ $ clientProvider = $ this -> get ( 'happyr.google_site_authenticator.client_provider' ) ; $ client = $ clientProvider -> getClient ( $ name ) ; $ client -> revokeToken ( ) ; $ clientProvider -> setAccessToken ( null , $ name ) ; $ this -> get ( 'session' ) -> getFlashbag ( ) -> add ( 'msg' , 'Token was revoked.' ) ; return $ this -> redirect ( $ this -> generateUrl ( 'happyr.google_site_authenticator.index' ) ) ; }
This action revokes the authentication token. This make sure the token can not be used on any other site.

@param Request $request
@param $name

@return Response
This action revokes the authentication token . This make sure the token can not be used on any other site .