mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
Make OAuth scope configurable for GoogleDrive.
This commit is contained in:
@@ -133,10 +133,14 @@ OAuthDialog::OAuthDialog(Context *context, OAuthSite site) :
|
||||
urlstr.append("response_type=code&");
|
||||
urlstr.append("client_id=").append(GC_GOOGLE_CALENDAR_CLIENT_ID);
|
||||
} else if (site == GOOGLE_DRIVE) {
|
||||
const QString scope =
|
||||
appsettings->cvalue(
|
||||
context->athlete->cyclist,
|
||||
GC_GOOGLE_DRIVE_AUTH_SCOPE, "drive.appdata").toString();
|
||||
// OAUTH 2.0 - Google flow for installed applications
|
||||
urlstr = QString("https://accounts.google.com/o/oauth2/auth?");
|
||||
// We only request access to the application data folder, not all files.
|
||||
urlstr.append("scope=https://www.googleapis.com/auth/drive.appdata&");
|
||||
urlstr.append("scope=https://www.googleapis.com/auth/" + scope + "&");
|
||||
urlstr.append("redirect_uri=urn:ietf:wg:oauth:2.0:oob&");
|
||||
urlstr.append("response_type=code&");
|
||||
urlstr.append("client_id=").append(GC_GOOGLE_DRIVE_CLIENT_ID);
|
||||
|
||||
Reference in New Issue
Block a user