Parziphal / parse

Parse with an Eloquent-like interface for Laravel
MIT License
17 stars 13 forks source link

Login remember token not working #22

Open jaisonjebin opened 6 years ago

jaisonjebin commented 6 years ago

User is not logged in even after remember token set.User is logged out soon after browser is closed

Parziphal commented 6 years ago

Which version of Laravel are you using?

jaisonjebin commented 6 years ago

"laravel/framework": "5.6.*" is it because of column name(remember_token on laravel and rememberToken on Parse)

Parziphal commented 6 years ago

The column name for the remember token is set to rememberToken in Auth/UserModel.php on line 34. Are you sure that's what is causing the problem?

jaisonjebin commented 6 years ago

Dont know what exact cause this.rememberToken is setting on db,also user is logged in for few hours(after browser close)

Parziphal commented 6 years ago

I've experienced that myself (with Laravel's vanilla login system, not with this library), that the user session expires within a couple hours.

But now I'm confused. First you said the user is logged out "soon after browser is closed", which I understood as "immediately" (because, actually, I read it as "as soon as the browser is closed"). Now you put it in a different way as you said "user is logged in for few hours". So, is the user logged out immediately, or after a couple hours? I probably misunderstood the first sentence.

If the session lasts just a couple hours, that's alright because Laravel sets the default session lifetime to 120 minutes. You change that in config/session.php, the lifetime option (should be in line 32).