Allow users to mount Google Drive external storage with a global client ID and key?

I have a client ID and secret for the Google Drive API. I want users to be able to mount their Drive account without knowing that ID and secret. They should be able to type in a folder name, select “Google Drive” from the External Storage column, and press “Grant access”, without seeing or entering the client ID and secret.

Is this possible without code modifications? If it isn’t possible, what files would I want to modify? Thanks.

umm… what if you would connect it globally (as an admin) - you’ll be asked for a name and this name would then show up with all users (or the ones you put in group) as a folder where store stuff.

if you want to have an own folder per user you could try the $user -var in your path but as far as i know you need to mkdir $user for each user manually

I don’t want users to have access to my Drive. I want them to have access to their Drives.

You want them to access their drives with your pw/secret???

Yes. I don’t want users to be able to see the pw/secret boxes or see the codes. The whole point of registering an application with Google is so users can integrate the application with their Google account, no?

sure. the user himself. not neccessarily other users. since this (google drive) is not intended to be a shared medium at first place.

since this would mean a personal folder in YOUR google-account i see no other way than making these folders manually in your G-drive and then share them individually to each user… they would have access to it through their account.

I think we’re not on the same page here. This is what I want:

  1. User goes to External Storages in their personal settings.
  2. User enters a folder name and selects Google Drive from the dropdown.
  3. User presses Grant Access.
  4. User signs into their Google account.
  5. User can now access their Drive via the folder they made in step 2.

At this point I’m over halfway through modifying the files_external code to do it.

apparently the missunderstanding came from this line (s. above)… i thought they would need YOUR secret/ID… “their ID and secret” would have made it clearer from beginning on.

cool. am interested if you’ll be getting it to run. and how.

There would be one ID and one secret for all users on the server. ID/secret pairs are assigned to an application, not to a user. That’s why you can sign in to a website or app with your Google account without needing to supply your own ID and secret. Apologies if you already know that.

I’m basically going through the code, finding all the places where the user-supplied ID/secret are expected, and rewriting those places to instead use a globally-defined pair. That way the users won’t need to worry about requesting their own, and I won’t be giving away a secret key to strangers that could use it to mine Bitcoin on Google’s cloud with my credit card :).