diff --git a/route/api.socialhub.php b/route/api.socialhub.php index a425504..ac0f0c1 100644 --- a/route/api.socialhub.php +++ b/route/api.socialhub.php @@ -111,8 +111,9 @@ try { } else { $hauth_adapter = $hauth->getAdapter($provider); } + $session_flag = true; } catch(Exception $e) { - // nothing + $hauth_adapter = $hauth->authenticate($provider); } if(!$session_flag) { @@ -157,3 +158,5 @@ switch($action) { show_errors(); } +echo json_encode($context); +