keepassium / KeePassium

KeePass-compatible password manager for iOS
https://keepassium.com
Other
1.19k stars 105 forks source link

Support Multiple Google Drive Accounts #203

Closed EagTG closed 2 years ago

EagTG commented 2 years ago

Describe the feature you'd like

Google Drive support works, but only seems to be able to acknowledge the last account that was utilized via the Google Drive app. For example, if I use the Google Drive app with my Personal Google account, the files listed in KeePassium's browser are for that account. Selecting a KeePass database there, and then swapping the Google Drive app to my work account causes KeePassium to fail to load the database. This part might be a bit of a bug instead of a feature request, but it also seems to "break" KeePassium's ability to re-sync to the database without completely removing the "link" to that database file from KeePassium and then re-assigning it via switching to the Google Drive app, switching to the appropriate Google account, then browsing the appropriate database file.

A description of what you want to be added.

Support for multiple Google accounts (personal and work, for example) in the KeePassium Google Drive integration.

And why you need it — that is, how it would make your life better.

My Google Drive app syncs to a personal and work Google account. It would be nice if I can always have the KeePassium app synchronize to a specific Google account rather than only the last one the Google Drive app utilized.

I have not yet been able to figure out a work-around other than making sure my Google Drive app is connected to the appropriate Google Account prior to launching KeePassium.

keepassium commented 2 years ago

Hi, thank you for the suggestion.

I'm afraid this is not KeePassium's limitation… KeePassium uses the standard file selection dialog, which is pretty much a reduced version of the Files app. So the issue boils down to how Google Drive integrates with the Files app.

Google Drive shows only the current account in Files. When you switch accounts in Google Drive, it un-registers the previous account from the Files, then registers the new one. For security reasons, any references to files in the previous account are invalidated. (You don't want an app to access GDrive files after you logged out from there, right?)

So unfortunately there is not much I can do, unless Google Drive starts showing different accounts as separate storage locations in the Files app. (For example, OneDrive shows up in Files as "OneDrive — personal" and "OneDrive — companyName".)

I don't know whether Google would be willing to support multi-account integration with iOS Files, so you might want to use a workaround instead. Integrate your personal GDrive account using a third-party app (Boxcryptor is free, FE FileExplorer is paid, Documents by Readdle is free but requires manual sync). This way, you would have your personal Google Drive always present in the Files, so you can point KeePassium to a stable always-present file.

EagTG commented 2 years ago

Ahh, OK. This is the first I've run into that limitation of Files/Google Drive, however, this is also the first time I've really used it in this fashion.

Thanks for the thoughtful and complete reply! -Todd