Skip to content

Commit 500045d

Browse files
eykchanatomarch
authored andcommitted
Fixes for issues 8thwall#7 and 8thwall#9 (8thwall#8)
* Update token retrieval - Fixes issue 8thwall#7 * Block access to client_secrets.json - Fixes issue 8thwall#9
1 parent 968bb1d commit 500045d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Files "client_secrets.json">
2+
Order Allow,Deny
3+
Deny from all
4+
</Files>

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function atomarch_google_auth() {
5858

5959
} else {
6060
// Exchange an authorization code for an access token
61-
$client->fetchAccessTokenWithAuthCode($_GET['code']);
61+
$token = $client->fetchAccessTokenWithAuthCode($_GET['code']);
6262
//Store Access Token in a session variable
63-
$_SESSION['access_token'] = $client->getAccessToken();
63+
$_SESSION['access_token'] = $token;
6464

6565
if ( atomarch_check_domain($client) === false ) {
6666
$client->revokeToken();

0 commit comments

Comments
 (0)