Quantcast

Logout user on browser close

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Logout user on browser close

Andrés Manikis
Hello, i'm trying to force logout after I close the browser but I don't know how to do it.
If I close the browser without logging out and then I go back to the application the user is still logged in.

Is there a way to configure Auth to logout users after I close the browser?

Thank you!
Andrés

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

John Hardy

Use a session cookie vs a cookie set to expire at a future date. This will clear the cookie every time the browser closes

On May 31, 2012 7:48 AM, "Andrés Manikis" <[hidden email]> wrote:
Hello, i'm trying to force logout after I close the browser but I don't know how to do it.
If I close the browser without logging out and then I go back to the application the user is still logged in.

Is there a way to configure Auth to logout users after I close the browser?

Thank you!
Andrés

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

Andrés Manikis
In reply to this post by Andrés Manikis
Another thing to note.
In the cookbook explains that the user data is stored in a cookie. I don't want that. I would like to store the user data in a session so after closure the session expires and the user is not logged in anymore.

Thanks

El jueves, 31 de mayo de 2012 11:48:09 UTC-3, Andrés Manikis escribió:
Hello, i'm trying to force logout after I close the browser but I don't know how to do it.
If I close the browser without logging out and then I go back to the application the user is still logged in.

Is there a way to configure Auth to logout users after I close the browser?

Thank you!
Andrés

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

John Hardy

PHP uses a browser cookie to store the visitors session id. The only other way is to daisy chain the ID on the URL....... you don't want that trust me :-)

On May 31, 2012 8:02 AM, "Andrés Manikis" <[hidden email]> wrote:
Another thing to note.
In the cookbook explains that the user data is stored in a cookie. I don't want that. I would like to store the user data in a session so after closure the session expires and the user is not logged in anymore.

Thanks

El jueves, 31 de mayo de 2012 11:48:09 UTC-3, Andrés Manikis escribió:
Hello, i'm trying to force logout after I close the browser but I don't know how to do it.
If I close the browser without logging out and then I go back to the application the user is still logged in.

Is there a way to configure Auth to logout users after I close the browser?

Thank you!
Andrés

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

Andrés Manikis
In reply to this post by John Hardy
"Use a session cookie vs a cookie set to expire at a future date. This will clear the cookie every time the browser closes."

Could you give me an idea on how to do that?

Thank you!
Andrés

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

AD7six
In reply to this post by Andrés Manikis


On Thursday, 31 May 2012 17:02:17 UTC+2, Andrés Manikis wrote:
Another thing to note.
In the cookbook explains that the user data is stored in a cookie.

Your user data is not stored in a cookie - where is that stated?
 
I don't want that. I would like to store the user data in a session so after closure the session expires and the user is not logged in anymore.

That's how it works.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

Andrés Manikis
I don't know if the data itself is stored in a cookie or in a session.
But what is stored in a cookie is some info for the login.
Anyway, do you know how to logout the user when I close the browser?

I suppose it's a very common feature of any web application.

Thank you!
Andrés

El jueves, 31 de mayo de 2012 12:51:10 UTC-3, AD7six escribió:


On Thursday, 31 May 2012 17:02:17 UTC+2, Andrés Manikis wrote:
Another thing to note.
In the cookbook explains that the user data is stored in a cookie.

Your user data is not stored in a cookie - where is that stated?
 
I don't want that. I would like to store the user data in a session so after closure the session expires and the user is not logged in anymore.

That's how it works.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

John Hardy
Set the session cookie timeout to "0" "Zero" in core.


Google: Very common application used by web developers.

On May 31, 2012, at 12:41 PM, Andrés Manikis wrote:

I don't know if the data itself is stored in a cookie or in a session.
But what is stored in a cookie is some info for the login.
Anyway, do you know how to logout the user when I close the browser?

I suppose it's a very common feature of any web application.

Thank you!
Andrés

El jueves, 31 de mayo de 2012 12:51:10 UTC-3, AD7six escribió:


On Thursday, 31 May 2012 17:02:17 UTC+2, Andrés Manikis wrote:
Another thing to note.
In the cookbook explains that the user data is stored in a cookie.

Your user data is not stored in a cookie - where is that stated?
 
I don't want that. I would like to store the user data in a session so after closure the session expires and the user is not logged in anymore.

That's how it works.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Logout user on browser close

Andrés Manikis
Worked perfectly.

Thanks

Just for the record: I used Google but I didn't know there was a session cookie and that I could set the timeout to zero.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Loading...