CLOUD: Use correct redirect_uris

Usage of #ifdef there (and in StorageWizardDialog) means that ScummVM
doesn't support both local webserver and scummvm.org paths at the same
time. It's either built with SDL_net (thus supporting localhost path) or
without it (thus using scummvm.org).
This commit is contained in:
Alexander Tkachev 2016-06-18 14:25:55 +06:00
parent 6ac69729d5
commit 1addefad7e
3 changed files with 13 additions and 1 deletions

View File

@ -67,7 +67,11 @@ void DropboxStorage::getAccessToken(Common::String code) {
request->addPostField("grant_type=authorization_code");
request->addPostField("client_id=" + Common::String(KEY));
request->addPostField("client_secret=" + Common::String(SECRET));
#ifdef USE_SDL_NET
request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost%3A12345%2F");
#else
request->addPostField("&redirect_uri=https%3A%2F%2Fwww.scummvm.org/c/code");
#endif
addRequest(request);
}

View File

@ -87,7 +87,11 @@ void GoogleDriveStorage::getAccessToken(BoolCallback callback, Common::String co
}
request->addPostField("client_id=" + Common::String(KEY));
request->addPostField("client_secret=" + Common::String(SECRET));
request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost");
#ifdef USE_SDL_NET
request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost%3A12345");
#else
request->addPostField("&redirect_uri=https%3A%2F%2Fwww.scummvm.org/c/code");
#endif
addRequest(request);
}

View File

@ -83,7 +83,11 @@ void OneDriveStorage::getAccessToken(BoolCallback callback, Common::String code)
}
request->addPostField("client_id=" + Common::String(KEY));
request->addPostField("client_secret=" + Common::String(SECRET));
#ifdef USE_SDL_NET
request->addPostField("&redirect_uri=http%3A%2F%2Flocalhost%3A12345%2F");
#else
request->addPostField("&redirect_uri=https%3A%2F%2Fwww.scummvm.org/c/code");
#endif
addRequest(request);
}