Ejemplo n.º 1
0
 /**
  * Get authorization code from callback and fetch user access_token and
  * other information
  *
  * @access  public
  * @param   string      $provider
  * @return  Response
  * @throws  Strategy\Exception
  */
 public function action_callback($provider = null)
 {
     // if provider data is somehow empty, it might not came from a
     // provider.
     if (empty($provider)) {
         return \Response::error('404');
     }
     try {
         $strategy = Strategy::make($provider);
         return Strategy::login_or_register($strategy);
     } catch (Strategy\Exception $e) {
         return $this->action_error($provider, $e->getMessage());
     }
 }
Ejemplo n.º 2
0
 public function action_callback($provider)
 {
     $strategy = Strategy::forge($provider);
     Strategy::login_or_register($strategy);
 }