aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-18 14:25:55 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit1addefad7e29ff674828c6dad5330c87a4203f29 (patch)
tree94f0c5913e98679bae14c84267375e9dcb08f08f
parent6ac69729d5c93899a3b1f5d82b6c5b008f030a7c (diff)
downloadscummvm-rg350-1addefad7e29ff674828c6dad5330c87a4203f29.tar.gz
scummvm-rg350-1addefad7e29ff674828c6dad5330c87a4203f29.tar.bz2
scummvm-rg350-1addefad7e29ff674828c6dad5330c87a4203f29.zip
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).
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp4
-rw-r--r--backends/cloud/googledrive/googledrivestorage.cpp6
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp4
3 files changed, 13 insertions, 1 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index 64425812db..3cf14d5e0b 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -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);
}
diff --git a/backends/cloud/googledrive/googledrivestorage.cpp b/backends/cloud/googledrive/googledrivestorage.cpp
index 6d0a152938..df29a87eec 100644
--- a/backends/cloud/googledrive/googledrivestorage.cpp
+++ b/backends/cloud/googledrive/googledrivestorage.cpp
@@ -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);
}
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index 5c230366a8..0d2f91c3a8 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -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);
}