Jan
Jan

Reputation: 27

Sentinel check always returns false

I'm using Sentinel in my laravel project and am encountering difficulties getting it to work. I set up everything correctly and still

Sentinel::authenticate($request->all());
return json_encode(Sentinel::check());

always returns false, despite the input data being correct. Furthermore, no rows are added to database table persistences, which usually is the case. I did some research on the problem, however, none of the questions were actually answered so I hope that here's hope to find this time.

Upvotes: 1

Views: 768

Answers (1)

atxpunkrock
atxpunkrock

Reputation: 514

I had the same issue and got little help from Cartalyst. I found that my issue originated with the config item 'session' in cartalyst.sentinel.php. I updated it to 'sentinel' instead of the default 'cartalyst_sentinel'. Once I reverted this the check worked in a private browser. I still had the issue in one particular model though. That issue was with the selected Facade. You'll need to make sure your use statement points to the Laravel Facade (use Cartalyst\Sentinel\Laravel\Facades\Sentinel) and not the the Native facade (use Cartalyst\Sentinel\Native\Facades\Sentinel).

Upvotes: 1

Related Questions