/home/techb158/immovalet.com/vendor/laravel/socialite/src/Two
NameSizeModeActions
AbstractProvider.php115520644editdlrm
BitbucketProvider.php28040644editdlrm
FacebookProvider.php44140644editdlrm
GithubProvider.php24820644editdlrm
GitlabProvider.php17360644editdlrm
GoogleProvider.php20160644editdlrm
InvalidStateException.php1440644editdlrm
LinkedInProvider.php35840644editdlrm
ProviderInterface.php4160644editdlrm
User.php12220644editdlrm
Edit: /home/techb158/immovalet.com/vendor/laravel/socialite/src/Two/FacebookProvider.php (4414B)
buildAuthUrlFromBase('https://www.facebook.com/'.$this->version.'/dialog/oauth', $state); } /** * {@inheritdoc} */ protected function getTokenUrl() { return $this->graphUrl.'/'.$this->version.'/oauth/access_token'; } /** * {@inheritdoc} */ public function getAccessTokenResponse($code) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'form_params' => $this->getTokenFields($code), ]); $data = json_decode($response->getBody(), true); return Arr::add($data, 'expires_in', Arr::pull($data, 'expires')); } /** * {@inheritdoc} */ protected function getUserByToken($token) { $this->lastToken = $token; $meUrl = $this->graphUrl.'/'.$this->version.'/me?access_token='.$token.'&fields='.implode(',', $this->fields); if (! empty($this->clientSecret)) { $appSecretProof = hash_hmac('sha256', $token, $this->clientSecret); $meUrl .= '&appsecret_proof='.$appSecretProof; } $response = $this->getHttpClient()->get($meUrl, [ 'headers' => [ 'Accept' => 'application/json', ], ]); return json_decode($response->getBody(), true); } /** * {@inheritdoc} */ protected function mapUserToObject(array $user) { $avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$user['id'].'/picture'; return (new User)->setRaw($user)->map([ 'id' => $user['id'], 'nickname' => null, 'name' => $user['name'] ?? null, 'email' => $user['email'] ?? null, 'avatar' => $avatarUrl.'?type=normal', 'avatar_original' => $avatarUrl.'?width=1920', 'profileUrl' => $user['link'] ?? null, ]); } /** * {@inheritdoc} */ protected function getCodeFields($state = null) { $fields = parent::getCodeFields($state); if ($this->popup) { $fields['display'] = 'popup'; } if ($this->reRequest) { $fields['auth_type'] = 'rerequest'; } return $fields; } /** * Set the user fields to request from Facebook. * * @param array $fields * @return $this */ public function fields(array $fields) { $this->fields = $fields; return $this; } /** * Set the dialog to be displayed as a popup. * * @return $this */ public function asPopup() { $this->popup = true; return $this; } /** * Re-request permissions which were previously declined. * * @return $this */ public function reRequest() { $this->reRequest = true; return $this; } /** * Get the last access token used. * * @return string|null */ public function lastToken() { return $this->lastToken; } /** * Specify which graph version should be used. * * @param string $version * @return $this */ public function usingGraphVersion(string $version) { $this->version = $version; return $this; } }