diff --git a/examples/gmail_send_email.php b/examples/gmail_send_email.php index 37fdd40..a2a3e7c 100644 --- a/examples/gmail_send_email.php +++ b/examples/gmail_send_email.php @@ -33,6 +33,7 @@ if (isset($_GET['code'])) { $_SESSION['access_token'] = $curl->response->access_token; header('Location: ?'); + exit; } elseif (!empty($_SESSION['access_token'])) { // Use the access token to send an email. $curl = new Curl(); diff --git a/examples/google_plus_profile.php b/examples/google_plus_profile.php index b8832d4..d3c0735 100644 --- a/examples/google_plus_profile.php +++ b/examples/google_plus_profile.php @@ -33,6 +33,7 @@ if (isset($_GET['code'])) { $_SESSION['access_token'] = $curl->response->access_token; header('Location: ?'); + exit; } elseif (!empty($_SESSION['access_token']) && !isset($_GET['retry'])) { // Use the access token to retrieve the profile. $curl = new Curl();