diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-11-06 12:35:28 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-11-06 13:56:37 +0100 |
commit | 26b01c7fffa619fa508057656bd90a30f39c1bcc (patch) | |
tree | 7360c623798f4d42eaedd481174d08c9366dc48f /apps/files_external/ajax | |
parent | 6e7411fc4c6cf8f05d9937bcf112728285a42f50 (diff) | |
download | nextcloud-server-26b01c7fffa619fa508057656bd90a30f39c1bcc.tar.gz nextcloud-server-26b01c7fffa619fa508057656bd90a30f39c1bcc.zip |
Force approval in GDrive oauth to get refresh_token
Forcing the approval of app permissions makes sure that the GDrive API
will always return a refresh_token.
In the case of apps that were already authorized for the current user/domain,
the API doesn't return the refresh_token which causes expiration issues.
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r-- | apps/files_external/ajax/oauth2.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_external/ajax/oauth2.php b/apps/files_external/ajax/oauth2.php index e3e32c4b912..fbe60e16e26 100644 --- a/apps/files_external/ajax/oauth2.php +++ b/apps/files_external/ajax/oauth2.php @@ -41,6 +41,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST $client->setClientSecret((string)$_POST['client_secret']); $client->setRedirectUri((string)$_POST['redirect']); $client->setScopes(array('https://www.googleapis.com/auth/drive')); + $client->setApprovalPrompt('force'); $client->setAccessType('offline'); if (isset($_POST['step'])) { $step = $_POST['step']; |