for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\LaravelAuth\Services;
use Illuminate\Support\Collection;
/**
* Class SocialAuthenticator
*
* @package Arcanedev\LaravelAuth\Services
* @author ARCANEDEV <[email protected]>
*/
class SocialAuthenticator
{
* Check if social authentication is enabled.
* @return bool
public static function isEnabled()
return config('laravel-auth.socialite.enabled', false);
}
* Get the supported drivers.
* @return \Illuminate\Support\Collection
public static function drivers()
return Collection::make(config('laravel-auth.socialite.drivers', []));
* Get the enabled drivers.
public static function enabledDrivers()
return static::drivers()->filter(function ($driver) {
return $driver['enabled'];
});
* Check if the given driver is supported.
* @param string $driver
public static function isSupported($driver)
return static::enabledDrivers()->has($driver);