Skip to content

Oauth failed for googledrive when the app is installed from the Microsoft Store #13695

@yokada-code

Description

@yokada-code

Describe the bug

Cyberduck installed from Microsoft Store fails oauth process for googledrive authentication.

During the app waiting for the browser response about user authentication/authorization, the browser doesn't kick back to the app.
The authorization page is redirected to the google top page without displaying any dialogs.

This issue doesn't occur if the app is installed from the installer provided in the web ( https://cyberduck.io/download/ ).

I tried several times to reproduce this issue with the app installed from the Microsoft Store and the app from the web installer, and found that: if I installed it from the web installer, the following registry keys are created, but if I installed from the Microsoft Store, it isn't.

PS C:\> Get-Item -Path "HKCU:\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib"


    Hive: HKEY_CURRENT_USER\Software\Classes


Name                           Property
----                           --------
com.googleusercontent.apps.996 (default)    : custom handler
125414232-30v0nuldk4p54spra0k6 URL Protocol :
gg3b8c8c9kib

PS C:\> Get-ChildItem -Path "HKCU:\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib\shell\open"


    Hive: HKEY_CURRENT_USER\Software\Classes\com.googleusercontent.apps.996125414232-30v0nuldk4p54spra0k6gg3b8c8c9kib\shell\open


Name                           Property
----                           --------
command                        (default) : "C:\Program Files\Cyberduck\Cyberduck.exe" "%1"

I guess this registry key is necessary to work oauth properly.
This registry key is specified as oauth redirect url in the commit 9626cfc .

So, I tried to avoid this issue by creating such registry keys manually, and confirmed it works fine.
One thing I have to be careful is the installation path, there is a difference between the app installed from the Microsoft Store and from the installer.

To Reproduce

Install the cyberduck from Microsoft Store and try to connect to googledrive.

Note: If you have already installed the installer version previously, registry key may be remains. In that case, the browser try to open "custom handler" app in oauth process. But it won't work because the regisry key named "command" does not indicate the proper app path.

Expected behavior

Oauth succeed and files in the googledrive listed.

Screenshots

None

Desktop (please complete the following information):

  • Windows 11 21H2 22000.856
  • Google Chrome 104.0.5112.102
  • Cyberduck 8.4.3

Log Files

None

Additional context

None

Metadata

Metadata

Assignees

Labels

googledriveGoogle Drive Protocol ImplementationgooglestorageGoogle Cloud Storage Protocol Implementation

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions