[Pkg-owncloud-commits] [owncloud] 18/86: Force approval in GDrive oauth to get refresh_token

David Prévot taffit at moszumanska.debian.org
Tue Dec 22 16:51:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.5
in repository owncloud.

commit f6872ef1a52beafae098790869521125fcc695e9
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Fri Nov 6 12:35:28 2015 +0100

    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.
---
 apps/files_external/ajax/google.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index acaf1b0..e094367 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -39,6 +39,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'];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list