Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
78f449c3
authored
2016-10-04 20:15:43 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sss
1 parent
16aacad7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
app/Http/Controllers/GoogledriveuploadpdfController.php
app/Http/Controllers/GoogledriveuploadpdfController.php
View file @
78f449c
...
...
@@ -209,7 +209,7 @@ public function isGoogleFolderCreated($cust_id)
$client
->
setScopes
(
array
(
'https://www.googleapis.com/auth/drive.file'
));
$client
->
setClientId
(
'206523860143-kgs80emhfm1sof79nggd48gnhbl1j6ei.apps.googleusercontent.com'
);
$client
->
setClientSecret
(
'ZzEE02Dqz7AKJLSklmL30LNd'
);
$client
->
setRedirectUri
(
'https://pdf-customizer.synapsus.co/auth/google/token'
);
$client
->
setRedirectUri
(
'https://pdf-customizer.synapsus.co/auth/google/token
Callback
'
);
$client
->
setAccessType
(
'offline'
);
...
...
@@ -218,7 +218,7 @@ public function isGoogleFolderCreated($cust_id)
if
(
isset
(
$_GET
[
'code'
]))
{
$client
->
authenticate
(
$_GET
[
'code'
]);
$_SESSION
[
'token'
]
=
$client
->
getAccessToken
();
$redirect
=
'http
s
://'
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'PHP_SELF'
];
$redirect
=
'http://'
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'PHP_SELF'
];
header
(
'Location: '
.
filter_var
(
$redirect
,
FILTER_SANITIZE_URL
));
return
;
}
...
...
@@ -252,8 +252,7 @@ public function isGoogleFolderCreated($cust_id)
echo
"<a class='logout' href='?logout'>Logout</a>"
;
}
else
{
$authUrl
=
$client
->
createAuthUrl
();
echo
"<a class='login' href='
$authUrl
'>Connect Me!</a>"
;
echo
"<a class='logout' href='?logout'>Logout</a>"
;
print
"<a class='login' href='
$authUrl
'>Connect Me!</a>"
;
}
}
...
...
Please
register
or
sign in
to post a comment