protected function invalidProvider($provider)
    {
        if (is_null($provider)) {
            return true;
        }

        foreach (config('auth.guards') as $guardsConfiguration) {
            if ($guardsConfiguration['provider'] === $provider) {
                return false;
            }
        }

        return true;
    }