Skip to content
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
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove google photos 😢
we spent a lot of time on implementing it but google decided to remove it,
so we have no choice
closes #5469
  • Loading branch information
mifi committed Mar 17, 2025
commit 2503174e141f6c96dd308769cb188726101d5d5b
1 change: 0 additions & 1 deletion BACKLOG.md
Original file line number Diff line number Diff line change
@@ -80,7 +80,6 @@ here.

### New providers

- [ ] Google Photos (#2163)
- [ ] MediaLibrary provider which shows you files that have already been
uploaded #450, #1121, #1112 #362
- [ ] Giphy image search (on top of Unsplash plugin) ()
2 changes: 1 addition & 1 deletion e2e/cypress/integration/dashboard-transloadit.spec.ts
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ describe('Dashboard with Transloadit', () => {
client_ip: null,
client_referer: null,
transloadit_client:
'uppy-core:3.2.0,uppy-transloadit:3.1.3,uppy-tus:3.1.0,uppy-dropbox:3.1.1,uppy-box:2.1.1,uppy-facebook:3.1.1,uppy-google-drive:3.1.1,uppy-google-photos:0.0.1,uppy-instagram:3.1.1,uppy-onedrive:3.1.1,uppy-zoom:2.1.1,uppy-url:3.3.1',
'uppy-core:3.2.0,uppy-transloadit:3.1.3,uppy-tus:3.1.0,uppy-dropbox:3.1.1,uppy-box:2.1.1,uppy-facebook:3.1.1,uppy-google-drive:3.1.1,uppy-instagram:3.1.1,uppy-onedrive:3.1.1,uppy-zoom:2.1.1,uppy-url:3.3.1',
start_date: new Date().toISOString(),
upload_meta_data_extracted: false,
warnings: [],
1 change: 0 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
"@uppy/golden-retriever": "workspace:^",
"@uppy/google-drive": "workspace:^",
"@uppy/google-drive-picker": "workspace:^",
"@uppy/google-photos": "workspace:^",
"@uppy/google-photos-picker": "workspace:^",
"@uppy/image-editor": "workspace:^",
"@uppy/informer": "workspace:^",
1 change: 0 additions & 1 deletion examples/angular-example/package.json
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
"@uppy/core": "workspace:*",
"@uppy/drag-drop": "workspace:*",
"@uppy/google-drive": "workspace:*",
"@uppy/google-photos": "workspace:*",
"@uppy/progress-bar": "workspace:*",
"@uppy/tus": "workspace:*",
"@uppy/webcam": "workspace:*",
34 changes: 12 additions & 22 deletions packages/@uppy/companion/src/config/grant.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
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
@@ -25,17 +10,22 @@ 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',

This file was deleted.

3 changes: 1 addition & 2 deletions packages/@uppy/companion/src/server/provider/index.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
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')
@@ -69,7 +68,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
}
5 changes: 0 additions & 5 deletions packages/@uppy/companion/src/standalone/helper.js
Original file line number Diff line number Diff line change
@@ -89,11 +89,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'),
25 changes: 0 additions & 25 deletions packages/@uppy/companion/test/__tests__/provider-manager.js
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ describe('Test Provider options', () => {
expect(grantConfig.googledrive.key).toBe('google_key')
expect(grantConfig.googledrive.secret).toBe('google_secret')

expect(grantConfig.googlephotos.key).toBe('google_key')
expect(grantConfig.googledrive.secret).toBe('google_secret')

expect(grantConfig.instagram.key).toBe('instagram_key')
@@ -96,25 +95,6 @@ describe('Test Provider options', () => {
},
})

expect(grantConfig.googlephotos).toEqual({
access_url: "https://oauth2.googleapis.com/token",
authorize_url: "https://accounts.google.com/o/oauth2/v2/auth",
oauth: 2,
scope_delimiter: " ",

key: 'google_key',
secret: 'google_secret',
transport: 'session',
"state": true,
redirect_uri: 'http://localhost:3020/googlephotos/redirect',
scope: ['https://www.googleapis.com/auth/photoslibrary.readonly', 'https://www.googleapis.com/auth/userinfo.email'],
callback: '/googlephotos/callback',
custom_params: {
access_type: 'offline',
prompt: 'consent',
},
})

expect(grantConfig.zoom).toEqual({
key: 'zoom_key',
secret: 'zoom_secret',
@@ -142,7 +122,6 @@ describe('Test Provider options', () => {
expect(grantConfig.dropbox.secret).toBe('xobpord')
expect(grantConfig.box.secret).toBe('xwbepqd')
expect(grantConfig.googledrive.secret).toBe('elgoog')
expect(grantConfig.googlephotos.secret).toBe('elgoog')
expect(grantConfig.instagram.secret).toBe('margatsni')
expect(grantConfig.zoom.secret).toBe('u8Z5ceq')
expect(companionOptions.providerOptions.zoom.verificationToken).toBe('o0u8Z5c')
@@ -162,9 +141,6 @@ describe('Test Provider options', () => {
expect(grantConfig.googledrive.key).toBeUndefined()
expect(grantConfig.googledrive.secret).toBeUndefined()

expect(grantConfig.googlephotos.key).toBeUndefined()
expect(grantConfig.googlephotos.secret).toBeUndefined()

expect(grantConfig.instagram.key).toBeUndefined()
expect(grantConfig.instagram.secret).toBeUndefined()

@@ -179,7 +155,6 @@ describe('Test Provider options', () => {
expect(grantConfig.dropbox.redirect_uri).toBe('http://domain.com/dropbox/redirect')
expect(grantConfig.box.redirect_uri).toBe('http://domain.com/box/redirect')
expect(grantConfig.googledrive.redirect_uri).toBe('http://domain.com/drive/redirect')
expect(grantConfig.googlephotos.redirect_uri).toBe('http://domain.com/googlephotos/redirect')
expect(grantConfig.instagram.redirect_uri).toBe('http://domain.com/instagram/redirect')
expect(grantConfig.zoom.redirect_uri).toBe('http://domain.com/zoom/redirect')
})
Loading

Unchanged files with check annotations Beta

containerHeight,
containerWidth,
})}
<ErrorButton file={file} onClick={() => alert(file.error)} />

Check warning on line 153 in packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx

GitHub Actions / Lint JavaScript/TypeScript

Unexpected alert
</div>
<div className="uppy-Dashboard-Item-status">
{renderAuthor({ file })}