Google File Picker and subdomains

After giving up on the process of getting the CASA assessment for Google Drive, we decided to use the Google File Picker plugin. Unfortunately, our application runs on dynamic subdomains and the OAuth Screen doesn’t allow wildcards on the JS Origins.

Has anyone run on the same issue? How did you sort it?

The only way we can see is by opening a new window using the main domain, running the Auth flow there and that should let us access from a subdomain. But I’m not sure how to trigger this when a user clicks on the Google Picker plugin. Any ideas?

Note: I initially posted and deleted this as I found a reference to oauthDomain in the docs. But, after testing it, the setting only seems to work with other providers, not GoogleFilePicker.

Thanks!

Hi!
It’s correct that oauthDomain doesn’t apply to the Picker which uses client-only oauth2 (compared to the other Uppy providers).

Maybe you could use Google’s API to dynamically add (sub)domains to the list in the developer console?

It might be possible to open a window yes (window.open). Or just use a normal <a href> link to your main domain when the user wants to upload files. then once the upload is finished, redirect them back to the subdomain.