1

I am facing a session loss issue while integrating FB login to the application. FB login gets succeeded, when user get redireced to my app it creates Auth session.

$this->Auth->login($user['User']); $this->redirect('/dashboard');

After redirecting it looses the session & redirect user to the login page.

I am just reading some articles, and trying out the solutions but nothing helped till.

Thanks, Vijay

Vijay Kumbhar
  • 896
  • 1
  • 13
  • 31
  • 1
    Did you set $user['User']? Also, put $this->Auth->login($user['User']) inside an if and redirects only on success. Before redirecting check $this->Auth->User() to see if it's populated. – tvdias Jun 19 '12 at 16:37
  • I had a similar issue. I found that some browsers get a little buggy when dealing with frames. take a look at http://stackoverflow.com/questions/2691864/facebook-iframe-app-with-multiple-pages-in-safari-session-variables-not-persisti as it may help – Angel S. Moreno Mar 25 '13 at 06:56

1 Answers1

0

For Facebook login, after successful authentication you need to append/write the user details on Auth session like that,

$this->Auth->user($this->request->data);