Merge pull request #20360 from owncloud/extstorage-gdrive-forceapproval
Force approval in GDrive oauth to get refresh_token
This commit is contained in:
commit
77335ca403
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
|
||||||
$client->setClientSecret((string)$_POST['client_secret']);
|
$client->setClientSecret((string)$_POST['client_secret']);
|
||||||
$client->setRedirectUri((string)$_POST['redirect']);
|
$client->setRedirectUri((string)$_POST['redirect']);
|
||||||
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
|
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
|
||||||
|
$client->setApprovalPrompt('force');
|
||||||
$client->setAccessType('offline');
|
$client->setAccessType('offline');
|
||||||
if (isset($_POST['step'])) {
|
if (isset($_POST['step'])) {
|
||||||
$step = $_POST['step'];
|
$step = $_POST['step'];
|
||||||
|
|
Loading…
Reference in a new issue