瀏覽代碼

google drive: set access type to 'offline' when requesting token

We need to do this in order to be able to refresh the access token without
prompting the user for their credentials every hour. This was the default
in 0.6 of the Google library, but needs to be explicitly specified in 1.0.
tags/v8.0.0alpha1
Adam Williamson 10 年之前
父節點
當前提交
61d70b17ee
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      apps/files_external/ajax/google.php

+ 1
- 0
apps/files_external/ajax/google.php 查看文件

@@ -14,6 +14,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
$client->setClientSecret($_POST['client_secret']);
$client->setRedirectUri($_POST['redirect']);
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
$client->setAccessType('offline');
if (isset($_POST['step'])) {
$step = $_POST['step'];
if ($step == 1) {

Loading…
取消
儲存