-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove google photos 😢 #5690
Open
mifi
wants to merge
1
commit into
main
Choose a base branch
from
remove-google-photos
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
remove google photos 😢 #5690
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
we spent a lot of time on implementing it but google decided to remove it, so we have no choice closes #5469
Diff output filesdiff --git a/packages/@uppy/companion/lib/config/grant.d.ts b/packages/@uppy/companion/lib/config/grant.d.ts
index 183e854..33574f1 100644
--- a/packages/@uppy/companion/lib/config/grant.d.ts
+++ b/packages/@uppy/companion/lib/config/grant.d.ts
@@ -1,8 +1,5 @@
declare function _exports(): {
googledrive: {
- state: boolean;
- callback: string;
- scope: string[];
custom_params: {
access_type: string;
prompt: string;
@@ -11,21 +8,10 @@ declare function _exports(): {
access_url: string;
oauth: number;
scope_delimiter: string;
- transport: string;
- };
- googlephotos: {
+ state: boolean;
callback: string;
scope: string[];
- custom_params: {
- access_type: string;
- prompt: string;
- };
- authorize_url: string;
- access_url: string;
- oauth: number;
- scope_delimiter: string;
transport: string;
- state: boolean;
};
dropbox: {
authorize_url: string;
diff --git a/packages/@uppy/companion/lib/config/grant.js b/packages/@uppy/companion/lib/config/grant.js
index f475ecd..5f32f2d 100644
--- a/packages/@uppy/companion/lib/config/grant.js
+++ b/packages/@uppy/companion/lib/config/grant.js
@@ -1,18 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const google = {
- // access_type: offline is needed in order to get refresh tokens.
- // prompt: 'consent' is needed because sometimes a user will get stuck in an authenticated state where we will
- // receive no refresh tokens from them. This seems to be happen when running on different subdomains.
- // therefore to be safe that we always get refresh tokens, we set this.
- // https://stackoverflow.com/questions/10827920/not-receiving-google-oauth-refresh-token/65108513#65108513
- custom_params: { access_type: "offline", prompt: "consent" },
- // copied from https://github.com/simov/grant/blob/master/config/oauth.json
- "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth",
- "access_url": "https://oauth2.googleapis.com/token",
- "oauth": 2,
- "scope_delimiter": " ",
-};
const defaults = {
transport: "session",
state: true, // Enable CSRF check
@@ -24,20 +11,21 @@ module.exports = () => {
// and because it would be a too big rewrite to allow reuse of the same provider.
googledrive: {
...defaults,
- ...google,
+ // access_type: offline is needed in order to get refresh tokens.
+ // prompt: 'consent' is needed because sometimes a user will get stuck in an authenticated state where we will
+ // receive no refresh tokens from them. This seems to be happen when running on different subdomains.
+ // therefore to be safe that we always get refresh tokens, we set this.
+ // https://stackoverflow.com/questions/10827920/not-receiving-google-oauth-refresh-token/65108513#65108513
+ custom_params: { access_type: "offline", prompt: "consent" },
+ // copied from https://github.com/simov/grant/blob/master/config/oauth.json
+ authorize_url: "https://accounts.google.com/o/oauth2/v2/auth",
+ access_url: "https://oauth2.googleapis.com/token",
+ oauth: 2,
+ scope_delimiter: " ",
state: true,
callback: "/drive/callback",
scope: ["https://www.googleapis.com/auth/drive.readonly"],
},
- googlephotos: {
- ...defaults,
- ...google,
- callback: "/googlephotos/callback",
- scope: [
- "https://www.googleapis.com/auth/photoslibrary.readonly",
- "https://www.googleapis.com/auth/userinfo.email",
- ], // if name is needed, then add https://www.googleapis.com/auth/userinfo.profile too
- },
dropbox: {
...defaults,
authorize_url: "https://www.dropbox.com/oauth2/authorize",
diff --git a/packages/@uppy/companion/lib/server/provider/index.js b/packages/@uppy/companion/lib/server/provider/index.js
index d7060a2..1418a9a 100644
--- a/packages/@uppy/companion/lib/server/provider/index.js
+++ b/packages/@uppy/companion/lib/server/provider/index.js
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
const dropbox = require("./dropbox");
const box = require("./box");
const { Drive } = require("./google/drive");
-const googlephotos = require("./google/googlephotos");
const instagram = require("./instagram/graph");
const facebook = require("./facebook");
const onedrive = require("./onedrive");
@@ -66,7 +65,7 @@ module.exports.getProviderMiddleware = (providers, grantConfig) => {
* @returns {Record<string, typeof Provider>}
*/
module.exports.getDefaultProviders = () => {
- const providers = { dropbox, box, drive: Drive, googlephotos, facebook, onedrive, zoom, instagram, unsplash, webdav };
+ const providers = { dropbox, box, drive: Drive, facebook, onedrive, zoom, instagram, unsplash, webdav };
return providers;
};
/**
diff --git a/packages/@uppy/companion/lib/standalone/helper.js b/packages/@uppy/companion/lib/standalone/helper.js
index b3c9540..85b7b91 100644
--- a/packages/@uppy/companion/lib/standalone/helper.js
+++ b/packages/@uppy/companion/lib/standalone/helper.js
@@ -81,11 +81,6 @@ const getConfigFromEnv = () => {
secret: getSecret("COMPANION_GOOGLE_SECRET"),
credentialsURL: process.env.COMPANION_GOOGLE_KEYS_ENDPOINT,
},
- googlephotos: {
- key: process.env.COMPANION_GOOGLE_KEY,
- secret: getSecret("COMPANION_GOOGLE_SECRET"),
- credentialsURL: process.env.COMPANION_GOOGLE_KEYS_ENDPOINT,
- },
dropbox: {
key: process.env.COMPANION_DROPBOX_KEY,
secret: getSecret("COMPANION_DROPBOX_SECRET"),
diff --git a/packages/@uppy/locales/lib/en_US.js b/packages/@uppy/locales/lib/en_US.js
index 52e717d..0f84bfd 100644
--- a/packages/@uppy/locales/lib/en_US.js
+++ b/packages/@uppy/locales/lib/en_US.js
@@ -128,7 +128,6 @@ en_US.strings = {
pluginNameDropbox: "Dropbox",
pluginNameFacebook: "Facebook",
pluginNameGoogleDrive: "Google Drive",
- pluginNameGooglePhotos: "Google Photos",
pluginNameGoogleDrivePicker: "Google Drive",
pluginNameGooglePhotosPicker: "Google Photos",
pluginNameInstagram: "Instagram",
diff --git a/packages/@uppy/locales/lib/ms_MY.js b/packages/@uppy/locales/lib/ms_MY.js
index ea072fa..dd36e0c 100644
--- a/packages/@uppy/locales/lib/ms_MY.js
+++ b/packages/@uppy/locales/lib/ms_MY.js
@@ -122,7 +122,6 @@ ms_MY.strings = {
pluginNameDropbox: "Dropbox",
pluginNameFacebook: "Facebook",
pluginNameGoogleDrive: "Google Drive",
- pluginNameGooglePhotos: "Google Photos",
pluginNameInstagram: "Instagram",
pluginNameOneDrive: "OneDrive",
pluginNameScreenCapture: "Screencast",
diff --git a/packages/@uppy/remote-sources/lib/index.js b/packages/@uppy/remote-sources/lib/index.js
index 4ca5f10..364abda 100644
--- a/packages/@uppy/remote-sources/lib/index.js
+++ b/packages/@uppy/remote-sources/lib/index.js
@@ -11,7 +11,6 @@ import { BasePlugin } from "@uppy/core";
import Dropbox from "@uppy/dropbox";
import Facebook from "@uppy/facebook";
import GoogleDrive from "@uppy/google-drive";
-import GooglePhotos from "@uppy/google-photos";
import Instagram from "@uppy/instagram";
import OneDrive from "@uppy/onedrive";
import Unsplash from "@uppy/unsplash";
@@ -26,7 +25,6 @@ const availablePlugins = {
Dropbox,
Facebook,
GoogleDrive,
- GooglePhotos,
Instagram,
OneDrive,
Unsplash,
diff --git a/packages/@uppy/transloadit/lib/index.js b/packages/@uppy/transloadit/lib/index.js
index 864333d..97d078f 100644
--- a/packages/@uppy/transloadit/lib/index.js
+++ b/packages/@uppy/transloadit/lib/index.js
@@ -458,7 +458,6 @@ function _getClientVersion2() {
addPluginVersion("Box", "uppy-box");
addPluginVersion("Facebook", "uppy-facebook");
addPluginVersion("GoogleDrive", "uppy-google-drive");
- addPluginVersion("GooglePhotos", "uppy-google-photos");
addPluginVersion("GoogleDrivePicker", "uppy-google-drive-picker");
addPluginVersion("GooglePhotosPicker", "uppy-google-photos-picker");
addPluginVersion("Instagram", "uppy-instagram"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
we spent a lot of time on implementing it but google decided to remove it, so we have no choice
closes #5469