src/One/AbstractProvider.php
public function userFromTokenAndSecret($token, $secret)
    {
        $tokenCredentials = new TokenCredentials();

        $tokenCredentials->setIdentifier($token);
        $tokenCredentials->setSecret($secret);

        $user = $this->server->getUserDetails(
            $tokenCredentials, $this->shouldBypassCache($token, $secret)
        );

        $instance = (new User)->setRaw($user->extra)
            ->setToken($tokenCredentials->getIdentifier(), $tokenCredentials->getSecret());

        return $instance->map([
            'id' => $user->uid,
            'nickname' => $user->nickname,
            'name' => $user->name,
            'email' => $user->email,
            'avatar' => $user->imageUrl,
        ]);
    }
public function userFromTokenAndSecret($token, $secret)
    {
        $tokenCredentials = new TokenCredentials();

        $tokenCredentials->setIdentifier($token);
        $tokenCredentials->setSecret($secret);

        $user = $this->server->getUserDetails(
            $tokenCredentials, $this->shouldBypassCache($token, $secret)
        );

        $instance = (new User)->setRaw($user->extra)
            ->setToken($tokenCredentials->getIdentifier(), $tokenCredentials->getSecret());

        return $instance->map([
            'id' => $user->uid,
            'nickname' => $user->nickname,
            'name' => $user->name,
            'email' => $user->email,
            'avatar' => $user->imageUrl,
        ]);
    }
public function userFromTokenAndSecret ( $ token , $ secret ) { $ tokenCredentials = new TokenCredentials ( ) ; $ tokenCredentials -> setIdentifier ( $ token ) ; $ tokenCredentials -> setSecret ( $ secret ) ; $ user = $ this -> server -> getUserDetails ( $ tokenCredentials , $ this -> shouldBypassCache ( $ token , $ secret ) ) ; $ instance = ( new User ) -> setRaw ( $ user -> extra ) -> setToken ( $ tokenCredentials -> getIdentifier ( ) , $ tokenCredentials -> getSecret ( ) ) ; return $ instance -> map ( [ 'id' => $ user -> uid , 'nickname' => $ user -> nickname , 'name' => $ user -> name , 'email' => $ user -> email , 'avatar' => $ user -> imageUrl , ] ) ; }
Get a Social User instance from a known access token and secret.

@param  string  $token
@param  string  $secret
@return \Laravel\Socialite\One\User
Get a Social User instance from a known access token and secret .