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
0a6815de
authored
2016-10-04 20:02:22 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ddd
1 parent
0d43b657
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
app/Http/Controllers/GoogledriveuploadpdfController.php
app/Http/Controllers/GoogledriveuploadpdfController.php
View file @
0a6815d
...
...
@@ -215,13 +215,7 @@ public function isGoogleFolderCreated($cust_id)
$client
->
setApprovalPrompt
(
'force'
);
if
(
isset
(
$_GET
[
'code'
]))
{
$client
->
authenticate
(
$_GET
[
'code'
]);
$_SESSION
[
'token'
]
=
$client
->
getAccessToken
();
$redirect
=
'https://'
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'PHP_SELF'
];
header
(
'Location: '
.
filter_var
(
$redirect
,
FILTER_SANITIZE_URL
));
return
;
}
if
(
isset
(
$_SESSION
[
'token'
]))
{
$client
->
setAccessToken
(
$_SESSION
[
'token'
]);
...
...
@@ -240,7 +234,8 @@ public function isGoogleFolderCreated($cust_id)
<body>
<header><h1>
Get Token
</h1></header>
<?php
if
(
$client
->
getAccessToken
())
{
if
(
isset
(
$_GET
[
'code'
]))
{
$client
->
authenticate
(
$_GET
[
'code'
]);
$_SESSION
[
'token'
]
=
$client
->
getAccessToken
();
$token
=
json_decode
(
$_SESSION
[
'token'
]);
echo
"Access Token = "
.
$token
->
access_token
.
'<br/>'
;
...
...
Please
register
or
sign in
to post a comment