src/controllers/SocialRegisterController.php
public function register($provider_name) {
        $response = null;

        $profile = null;
        $route = Config::get('social-auth::register_route');
        $identifier = $this->auth($provider_name, $profile);
        if(!$this->checkRegistered($provider_name, $identifier)) {
            $register_info = App::make('Ipunkt\SocialAuth\RegisterInfo');
            /**
             * @var RegisterInfo $register_info
             */
            $register_info->setProvider($provider_name);
            
            SocialAuth::setRegistration($register_info);
            
            $response = Redirect::route($route);
        } else {
            $response = Redirect::route($route)->withErrors(['message' => trans('social-auth::user.account already registered', ['accountname' => $profile->displayName]),
                ['accountname' => $profile->displayName]]);
        }

        return $response;
    }
public function register($provider_name) {
        $response = null;

        $profile = null;
        $route = Config::get('social-auth::register_route');
        $identifier = $this->auth($provider_name, $profile);
        if(!$this->checkRegistered($provider_name, $identifier)) {
            $register_info = App::make('Ipunkt\SocialAuth\RegisterInfo');
            /**
             * @var RegisterInfo $register_info
             */
            $register_info->setProvider($provider_name);
            
            SocialAuth::setRegistration($register_info);
            
            $response = Redirect::route($route);
        } else {
            $response = Redirect::route($route)->withErrors(['message' => trans('social-auth::user.account already registered', ['accountname' => $profile->displayName]),
                ['accountname' => $profile->displayName]]);
        }

        return $response;
    }
public function register ( $ provider_name ) { $ response = null ; $ profile = null ; $ route = Config :: get ( 'social-auth::register_route' ) ; $ identifier = $ this -> auth ( $ provider_name , $ profile ) ; if ( ! $ this -> checkRegistered ( $ provider_name , $ identifier ) ) { $ register_info = App :: make ( 'Ipunkt\SocialAuth\RegisterInfo' ) ; /**
             * @var RegisterInfo $register_info
             */ $ register_info -> setProvider ( $ provider_name ) ; SocialAuth :: setRegistration ( $ register_info ) ; $ response = Redirect :: route ( $ route ) ; } else { $ response = Redirect :: route ( $ route ) -> withErrors ( [ 'message' => trans ( 'social-auth::user.account already registered' , [ 'accountname' => $ profile -> displayName ] ) , [ 'accountname' => $ profile -> displayName ] ] ) ; } return $ response ; }
Login into a social-auth account intending to register a new user with it
It is considered successful if the user logs into the social-auth account and the account is not yet attached to
a different Account on this system.

If Successful it will redirect back to the register page as set in the config and flash a new
registerInfo => ProfileRegisterInfo object to the register page.
On successful registration it is necessary to call registerInfo->success(newUser) to actualy attach the social-auth
user to the newly registered user

@see ProfileRegisterInfo
@param $provider_name
@return \Illuminate\Http\RedirectResponse|null
Login into a social - auth account intending to register a new user with it It is considered successful if the user logs into the social - auth account and the account is not yet attached to a different Account on this system .