public function handleProvider($name)
    {
        $this->extend('onBeforeHandleProvider', $name);

        $providers = Config::inst()->get($this->authenticator_class, 'providers');
        $config = $providers[$name];
        $scope = isset($config['scopes']) ? $config['scopes'] : ['email']; // We need at least an email address!
        $url = Helper::buildAuthorisationUrl($name, 'login', $scope);

        return $this->getController()->redirect($url);
    }
public function handleProvider($name)
    {
        $this->extend('onBeforeHandleProvider', $name);

        $providers = Config::inst()->get($this->authenticator_class, 'providers');
        $config = $providers[$name];
        $scope = isset($config['scopes']) ? $config['scopes'] : ['email']; // We need at least an email address!
        $url = Helper::buildAuthorisationUrl($name, 'login', $scope);

        return $this->getController()->redirect($url);
    }
public function handleProvider ( $ name ) { $ this -> extend ( 'onBeforeHandleProvider' , $ name ) ; $ providers = Config :: inst ( ) -> get ( $ this -> authenticator_class , 'providers' ) ; $ config = $ providers [ $ name ] ; $ scope = isset ( $ config [ 'scopes' ] ) ? $ config [ 'scopes' ] : [ 'email' ] ; // We need at least an email address! $ url = Helper :: buildAuthorisationUrl ( $ name , 'login' , $ scope ) ; return $ this -> getController ( ) -> redirect ( $ url ) ; }
Handle a submission for a given provider - build redirection

@param string $name
@return HTTPResponse
Handle a submission for a given provider - build redirection