sss
Showing
1 changed file
with
3 additions
and
4 deletions
| ... | @@ -209,7 +209,7 @@ public function isGoogleFolderCreated($cust_id) | ... | @@ -209,7 +209,7 @@ public function isGoogleFolderCreated($cust_id) |
| 209 | $client->setScopes(array('https://www.googleapis.com/auth/drive.file')); | 209 | $client->setScopes(array('https://www.googleapis.com/auth/drive.file')); |
| 210 | $client->setClientId('206523860143-kgs80emhfm1sof79nggd48gnhbl1j6ei.apps.googleusercontent.com'); | 210 | $client->setClientId('206523860143-kgs80emhfm1sof79nggd48gnhbl1j6ei.apps.googleusercontent.com'); |
| 211 | $client->setClientSecret('ZzEE02Dqz7AKJLSklmL30LNd'); | 211 | $client->setClientSecret('ZzEE02Dqz7AKJLSklmL30LNd'); |
| 212 | $client->setRedirectUri('https://pdf-customizer.synapsus.co/auth/google/token'); | 212 | $client->setRedirectUri('https://pdf-customizer.synapsus.co/auth/google/tokenCallback'); |
| 213 | 213 | ||
| 214 | $client->setAccessType('offline'); | 214 | $client->setAccessType('offline'); |
| 215 | 215 | ||
| ... | @@ -218,7 +218,7 @@ public function isGoogleFolderCreated($cust_id) | ... | @@ -218,7 +218,7 @@ public function isGoogleFolderCreated($cust_id) |
| 218 | if (isset($_GET['code'])) { | 218 | if (isset($_GET['code'])) { |
| 219 | $client->authenticate($_GET['code']); | 219 | $client->authenticate($_GET['code']); |
| 220 | $_SESSION['token'] = $client->getAccessToken(); | 220 | $_SESSION['token'] = $client->getAccessToken(); |
| 221 | $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 221 | $redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; |
| 222 | header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL)); | 222 | header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL)); |
| 223 | return; | 223 | return; |
| 224 | } | 224 | } |
| ... | @@ -252,8 +252,7 @@ public function isGoogleFolderCreated($cust_id) | ... | @@ -252,8 +252,7 @@ public function isGoogleFolderCreated($cust_id) |
| 252 | echo "<a class='logout' href='?logout'>Logout</a>"; | 252 | echo "<a class='logout' href='?logout'>Logout</a>"; |
| 253 | } else { | 253 | } else { |
| 254 | $authUrl = $client->createAuthUrl(); | 254 | $authUrl = $client->createAuthUrl(); |
| 255 | echo "<a class='login' href='$authUrl'>Connect Me!</a>"; | 255 | print "<a class='login' href='$authUrl'>Connect Me!</a>"; |
| 256 | echo "<a class='logout' href='?logout'>Logout</a>"; | ||
| 257 | } | 256 | } |
| 258 | 257 | ||
| 259 | } | 258 | } | ... | ... |
-
Please register or sign in to post a comment