Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit 4b1e51d

Browse files
committed
Updated README to reflect code change
1 parent 62d02c7 commit 4b1e51d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ The class exposes one function for now, `getLoginUrl`. This function will genera
109109
require('oauth.php');
110110
111111
$loggedIn = false;
112+
$redirectUri = 'http://localhost/php-tutorial/authorize.php';
112113
?>
113114

114115
<html>
@@ -120,7 +121,7 @@ The class exposes one function for now, `getLoginUrl`. This function will genera
120121
if (!$loggedIn) {
121122
?>
122123
<!-- User not logged in, prompt for login -->
123-
<p>Please <a href="<?php echo oAuthService::getLoginUrl('http://localhost/php-tutorial/authorize.php')?>">sign in</a> with your Office 365 account.</p>
124+
<p>Please <a href="<?php echo oAuthService::getLoginUrl($redirectUri)?>">sign in</a> with your Office 365 account.</p>
124125
<?php
125126
}
126127
else {
@@ -258,6 +259,7 @@ Finally, let's update the `./home.php` file to check for the presence of the acc
258259
require('oauth.php');
259260
260261
$loggedIn = !is_null($_SESSION['access_token']);
262+
$redirectUri = 'http://localhost/php-tutorial/authorize.php';
261263
?>
262264

263265
<html>
@@ -269,7 +271,7 @@ Finally, let's update the `./home.php` file to check for the presence of the acc
269271
if (!$loggedIn) {
270272
?>
271273
<!-- User not logged in, prompt for login -->
272-
<p>Please <a href="<?php echo oAuthService::getLoginUrl('http://localhost/php-tutorial/authorize.php')?>">sign in</a> with your Office 365 account.</p>
274+
<p>Please <a href="<?php echo oAuthService::getLoginUrl($redirectUri)?>">sign in</a> with your Office 365 account.</p>
273275
<?php
274276
}
275277
else {
@@ -416,6 +418,7 @@ Update `./home.php` to call the `getMessages` function and display the results.
416418
require('outlook.php');
417419
418420
$loggedIn = !is_null($_SESSION['access_token']);
421+
$redirectUri = 'http://localhost/php-tutorial/authorize.php';
419422
?>
420423

421424
<html>
@@ -427,7 +430,7 @@ Update `./home.php` to call the `getMessages` function and display the results.
427430
if (!$loggedIn) {
428431
?>
429432
<!-- User not logged in, prompt for login -->
430-
<p>Please <a href="<?php echo oAuthService::getLoginUrl('http://localhost/php-tutorial/authorize.php')?>">sign in</a> with your Office 365 account.</p>
433+
<p>Please <a href="<?php echo oAuthService::getLoginUrl($redirectUri)?>">sign in</a> with your Office 365 account.</p>
431434
<?php
432435
}
433436
else {
@@ -457,6 +460,7 @@ Update `./home.php` one final time to generate the table.
457460
require('outlook.php');
458461
459462
$loggedIn = !is_null($_SESSION['access_token']);
463+
$redirectUri = 'http://localhost/php-tutorial/authorize.php';
460464
?>
461465

462466
<html>
@@ -468,7 +472,7 @@ Update `./home.php` one final time to generate the table.
468472
if (!$loggedIn) {
469473
?>
470474
<!-- User not logged in, prompt for login -->
471-
<p>Please <a href="<?php echo oAuthService::getLoginUrl('http://localhost/php-tutorial/authorize.php')?>">sign in</a> with your Office 365 account.</p>
475+
<p>Please <a href="<?php echo oAuthService::getLoginUrl($redirectUri)?>">sign in</a> with your Office 365 account.</p>
472476
<?php
473477
}
474478
else {

0 commit comments

Comments
 (0)