I wrote an action to manually login which works fine. But if i go to /auth/facebook which redirects to the same action, manual login does not happen.
public function login()
{
$this->fb_login('my_fb_uid');
// debug($this->data);
}
public function fb_login($id)
{
$result = $this->User->find('first',array('conditions'=>array('fb_uid'=> $id)));
$temp = $result['User'];
if($this->Auth->login($temp))
{
return $this->redirect(array('action' => 'home'));
}
Going to /users/login() allows login with all user info becoming alvailable. But when /auth/facebook redirects to same the Auth:login returns 1 but without the data available.