I have a multi auth system, using a custom guard, 'Providers'.
The system logs in but on refresh, logs out.
After logging in the https changed from green in Chrome to grey.
You can see it here - https://babapp.co.uk/provider/login
user: [email protected]
pass: password
My auth.php file has this
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],a
'provider' => [
'driver' => 'session',
'provider' => 'providers',
],
],
and
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'providers' => [
'driver' => 'eloquent',
'model' => App\Provider::class,
],
],
ProviderLoginController.php has this
public function __construct()
{
$this->middleware('guest:provider', ['except'=>['logout']]);
}
All looks fine.
On the server, the session file for my custom guard login has different permissions to to laravel normal users login.
The user and group are the same, where as all other files have the www-data group and my linux user...
Could this be the issue?
Have also changed the session driver to database and the session is created but doesn't save a user_id for the session.
Not sure if this is a permissions problem or a middleware problem..
Any help greatly appreciated!
Thanks.