src/Controller/HybridAuthController.php
public function authenticated()
    {
        $user = $this->Auth->identify();
        if ($user) {
            $this->Auth->setUser($user);

            $this->dispatchEvent('HybridAuth.login', ['user' => $user]);

            return $this->redirect($this->Auth->redirectUrl());
        }

        return $this->redirect($this->Auth->config('loginAction'));
    }
public function authenticated()
    {
        $user = $this->Auth->identify();
        if ($user) {
            $this->Auth->setUser($user);

            $this->dispatchEvent('HybridAuth.login', ['user' => $user]);

            return $this->redirect($this->Auth->redirectUrl());
        }

        return $this->redirect($this->Auth->config('loginAction'));
    }
public function authenticated ( ) { $ user = $ this -> Auth -> identify ( ) ; if ( $ user ) { $ this -> Auth -> setUser ( $ user ) ; $ this -> dispatchEvent ( 'HybridAuth.login' , [ 'user' => $ user ] ) ; return $ this -> redirect ( $ this -> Auth -> redirectUrl ( ) ) ; } return $ this -> redirect ( $ this -> Auth -> config ( 'loginAction' ) ) ; }
This action exists just to ensure AuthComponent fetches user info from
hybridauth after successful login

Hyridauth's `hauth_return_to` is set to this action.

@return \Cake\Network\Response
This action exists just to ensure AuthComponent fetches user info from hybridauth after successful login