I'm using Laravel 5.2, with a fresh Sentinel 2.0 installation, registering works fine, but attempting to login returns the user, but does not set any cookie or session or whatsoever..
update1
At this moment I've found that no cookie/session is saved whatsoever. I can't really figure out as to why the cookie is not pushed.
AuthController.php
namespace App\Modules\Auth\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthController extends Controller {
public function getLogin() {
return view("Auth::login");
}
public function postLogin(Request $request) {
$credentials = [
'email' => $request->input('login_email'),
'password' => $request->input('login_password'),
];
if (\Sentinel::authenticate($credentials)) {
return redirect('core/dashboard');
}
}
}
\Sentinel::check();
var_dump() before redirect
object(Cartalyst\Sentinel\Users\EloquentUser)#188 (27) {
["table":protected]=>
string(5) "users"
["fillable":protected]=>
array(5) {
[0]=>
string(5) "email"
[1]=>
string(8) "password"
[2]=>
string(9) "last_name"
[3]=>
string(10) "first_name"
[4]=>
string(11) "permissions"
}
["persistableKey":protected]=>
string(7) "user_id"
["persistableRelationship":protected]=>
string(12) "persistences"
["loginNames":protected]=>
array(1) {
[0]=>
string(5) "email"
}
["connection":protected]=>
NULL
["primaryKey":protected]=>
string(2) "id"
["perPage":protected]=>
int(15)
["incrementing"]=>
bool(true)
["timestamps"]=>
bool(true)
["attributes":protected]=>
array(9) {
["id"]=>
int(1)
["email"]=>
string(25) "test@dev.local"
["password"]=>
string(60) "$2y$10$wXHwd6ubbHWWXU9CBI/7AOdDsHY.f7t8b1Kjem0m1ep7Ud.9M/4i6"
["permissions"]=>
NULL
["last_login"]=>
object(Carbon\Carbon)#192 (3) {
["date"]=>
string(26) "2016-01-06 15:15:42.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
Any ideas what can go wrong?
in .env
the session driver is set to database
, and the sessions table stays empty after login. No cookie is set either.