Open aligator28 opened 8 years ago
I have the same problem.
I don't use this package, but I investigated the issue for this question on SO: http://stackoverflow.com/questions/34856389/laravel-frozennode-authcheck-always-return-false
Basically, the issue is that the FrozenNode routes are not inside the web
middleware group. Because of this, the session is not available, and therefore Auth::check()
will always be false.
All you need to do is add web
to the middleware
key in your administrator.php
configuration.
return array(
// ...
'middleware' => array('web'),
// ...
);
@patrickcarlohickman +
Trying to implement authentication for frozennode backend, but can't. Using Laravel 5.2. In my config/administrator.php Auth::check() always returns false, even after successful login. (Installed default authentication in php artisan make:auth) This is a part of config/administrator.php
My app/Http/Controllers/Auth/AuthController.php added only property $redirectTo
In my route.php there is nothing special:
End when I login, middleware "Auth" check the user and redirects to main frontend page "/" it is working app/Http/Middleware/RedirectIfAuthenticated.php
Of course, I can change return redirect('/'); to return redirect('/admin');, but then I got an endless redirect, because in config/administrator.php Auth::check() always return false. Why? Cookies are enabled in browser. By the way in Laravel 5.0 everything works just fine (tried several minutes ago). Am I misunderstood something or Frozennode administrator doesn't work with laravel 5.2?