Kohana auto_login not working
I noticed today that the auto login for the Auth module in Kohana does not work. I snooped around a little and I think I found the problem.
The authautologin token is saved in a cookie and the database just fine whenever I login with "remember me" enabled. However, everytime I logout, the cooie gets destroyed.
Looking in the Auth library, I saw that everytime you logout, the user is deleted from the session, AND the 开发者_高级运维token is deleted from the cookie. In the auto login function, The authautologin cookie is necessary to work. Also, the token is deleted from the database with every logout.
Am I wrong or is something missing/incorrect about this?
However, everytime I logout, the cooie gets destroyed.
Of course, you don't want them to stay logged in forever do you.
Auto-login is meant for people who close their browsers without logging out. When they re-open the browser their session is resumed.
that's how every login system works. look at google gmail system if i dont click logout i'm still signed in even if i reboot my system. if i click logout i'm not signed in anymore.
my solution for you, don't click the logout button
精彩评论