Skip to content

Commit

Permalink
update files
Browse files Browse the repository at this point in the history
  • Loading branch information
juancristobalgd1 authored Feb 2, 2024
1 parent b848eb6 commit 6c34e05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/providers/FacebookProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ public function getCode()
*/
public function makeRedirect(string $url)
{
if (!headers_sent()) {
app()->response->redirect($url);
}
if (!headers_sent())
app()
->response
->redirect($url);
}
}
2 changes: 1 addition & 1 deletion src/providers/GoogleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ public function redirect()
public function user()
{
$code = $this->getCode();

if (!empty($code)) {
try {
$params = $this->getParams($code);

$curl = new Curl();
$response = $curl->post(self::ACCESS_TOKEN_URL, $params);
$data = json_decode($response['response'], true);

$userInfoUrl = self::USER_INFO_URL . '?access_token=' . $data['access_token'];
$userInfoResponse = $curl->get($userInfoUrl);
$userInfo = json_decode($userInfoResponse['response'], true);
Expand Down

0 comments on commit 6c34e05

Please sign in to comment.