Open Biptaste opened 8 years ago
I'm also experiencing this issue.
Hi guys,
I tried to create a custom EloquentUserProvider about your package and I also had the same problem. I searched for the problem and after some time, I realized that the method callCustomCreator in Kbwebs\MultiAuth\AuthManager class return a Guard type instead of a Provider type.
To resolve this issue, I chained a method getProvider() to return to be a Provider type.
/**
* Call a custom driver creator.
* @param string $driver
* @return \Kbwebs\MultiAuth\Guard
*/
protected function callCustomCreator($driver)
{
$custom = parent::callCustomCreator($driver)->getProvider(); <--------
if($custom instanceof Guard) {
return $custom;
}
return new Guard($custom, $this->app['session.store'], $this->name);
}
I have not tested to custom DatabaseProvider, that is why I have not sent a PR.
I hope that help.
Hi,
I tried to use your package with a custom UserProvider
I registered my UserProvider as written in Laravel's doc (I use Laravel 5.1)
Actually I wrote a dirty fix, I registered my provider like that.