Facebook strategy not allowing manual login.

30 views
Skip to first unread message

vipul

unread,
Dec 23, 2014, 2:29:31 AM12/23/14
to opa...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages