Basically:
protected function attempt() {
...
if(isset($user->id) && Auth::loginUsingId($user->id)) {
// if I do Auth::check() here I get TRUE
return Redirect::to('xxx');
} else {
return Redirect::to('login')->with('error', '...');
}
}
Route::group(array('prefix' => 'xxx', 'before' => 'auth.yyy'), function() {
...
});
Route::filter('auth.yyy', function() {
// if I do Auth::check() here I get FALSE
});
Also if I put some wrong credentials I should get that error from attempt but I don't..so it should be something with session configuration..but everything works on production server..
Yes! that was exactly what I needed, just tell the problem to someone and than I figured out :D Thanks astroanu you've been very useful :))
I overlooked the session configuration with 'domain' => '..server-domain..' so that's why session didn't work on localhost..simple as that..my fault:)
Fry4u said:
I overlooked the session configuration with 'domain' => '..server-domain..' so that's why session didn't work on localhost..simple as that..my fault:)
What is it supposed to be set to? Mine is set to null, and it seems like I'm having the exact same issue you had.
On production server it is like this:
'domain' => '.domain.com',
On my localhost:
'domain' => null,
And it works fine..
Send the code of session.php (without comments:))
Well, it's currently set to null, so that doesn't seem to be the issue. I just went ahead and made my own postLogin() to overwrite the pre-existing one in AuthController and everything is working just fine now. I can't figure out for the life of me what was causing the problem!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community