-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logout from app only not from facebook #131
Comments
I have the same problem. |
Me too |
I believe it would be easier if you described in a concrete way "why" (what's the logic behind this behavior) you want to be logged out of your app and not from facebook. Until then, have you tried putting a link /users/logout which would be something like public function logout() {
$this->Auth->logout();
$this->Session->destroy();
$this->redirect('/');
} Problem is that Connect component will probably relog your user automagically when he comes back to your app. Sooo.. you can be logged out of your app as long as you don't return to it after the call to /user/logout. |
It does not work. And I have never seen a site that does not offer logout from the app only. |
Ok, so you're speaking of a site, not an inside-facebook app right ? |
yes |
Have you tried using the connect component only from the UserController ? Even directly from the login action public function login(){
$this->set('facebookUser', $this->Connect->user()); //or whatever the use you make
} I may have spelled the call to the component wrong.. |
It tells me ConnectComponent does not exist ... |
I even tried it to put it in $components under users controller |
On the fly would be done like this : $this->Connect = $this->Components->load('Facebook.Connect', array('model' => 'User'));
$this->Connect->initialize($this);
$this->set('facebookUser', $this->Connect->user()); But loading it in the $components array is still much simpler. Don't forget to add the other components you normally need ! |
Yes, no more error but now I cannot login anymore. I can login only with my site username/password. If I try with facebook I only get an page refresh |
the login dialog must redirect to the controller/action where ConnectComponent is activated. Not sure how to do this, but check the possible settings in the facebookhelper->login() Keep us posted on your advancement ;) |
The actual redirect is not the problem. I can make it redirect wherever I want. But it does not log me in. |
I would really like some solution to this problem. I tried every possible way to logout only from my app and not from facebook and I did not found a solution. Someone said that noAuth should be set to true, but if I set noAuth to true then I cannot login anymore (it just refreshes the page with no login no nothing it's just like the button has not been clicked)
A very big thank you in advance to anyone who can share the answer to this question.
The text was updated successfully, but these errors were encountered: