How I can implement single sign-on with subdomains on Laravel-5? I have:
- api.domain.com
- portal.domain.com
I tryed set domain and driver parameters in /config/session:
'driver' => 'cookie'
or
'driver' => 'file'
and
'domain' => '.domain.com'
or
'domain' => null
It doesn't work anyway. I gets 401 (Unauthorized) anyway. Why?
In controller (it is standard laravel authentication):
public function __construct()
{
$this->middleware('auth');
}