cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

oAuth 2.0 has stopped working since electron (Chromium client)

oAuth 2.0 has stopped working since electron (Chromium client)

leriano7
Explorer | Level 3

oAuth 2.0 has stopped working from electron client v1.8.4 (Chromium client, in Windows and Mac), for direct Dropbox accounts. Right now it only works with Google accounts. Are you experiencing troubles with this?

Thank you!

13 Replies 13

Re: oAuth 2.0 has stopped working since electron (Chromium client)

Greg-DB
Dropboxer

Can you provide more details on this issue? We don't officially support Electron, but the OAuth flow itself is expected to work in Chromium (given that we officially support Chrome).

I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

  • the name and version of the Dropbox SDK/library you are using, if any
  • the full text of the error/any unexpected output, or a screenshot/screencast of any broken functionality
  • the steps to reproduce the issue, including relevant code snippet(s)

 

Re: oAuth 2.0 has stopped working since electron (Chromium client)

leriano7
Explorer | Level 3

Hello!

My oAuth 2.0 remains waiting when I choose direct Dropbox account. And only in Electron 1.8.4. The next image belongs to the app I'm developing. App name has been deleted to protect my company data.

Captura de pantalla (2848).png

I think that the problem is self described in the image. It remains permanently waiting in "Iniciar Sesión" button clicked. Only in electron 1.8.4. In Chrome it works fine.

The problem is that the authentication flow doesn't reach the redirect uri. (If you want more info about concrete app and redirect uri I can give you via private message).

About your questions: 

* Dropbox / SDK library: HTTP (REST API). Version 2: https://www.dropbox.com/developers/documentation/http/overview

* the full text of the error/any unexpected output, or a screenshot/screencast of any broken functionality: in this response it is

* the steps to reproduce the issue, including relevant code snippet(s): 

The problems appears in Windows 8.1 and Mac OSX Sierra.

Electron installed version 1.8.4.

Code snippet to launch the client inside electron window:

var state = '...';
var options = {
    hostname : 'www.dropbox.com',
    pathname : '/oauth2/authorize',
    method : 'GET',
    query : {
        client_id : dropbox.APP_ID,
        response_type : 'code',
        redirect_uri : 'https://.../dropboxauthcallback',
        state : state
    }
};
var route = url.format(options);
route = 'https://'+route;

openInNewTab(route);

var openInNewTab = function(url) {
    var win = window.open(url, '_blank');
    win.focus();

}

Electron has stopped working since some days ago.

Thank you!

Re: oAuth 2.0 has stopped working since electron (Chromium client)

leriano7
Explorer | Level 3

I made a mistake explaining: Electron has stopped working some days ago.

Re: oAuth 2.0 has stopped working since electron (Chromium client)

Greg-DB
Dropboxer

Thanks for the additional information! 

I see from your post that you're processing the OAuth app authorization flow in a web view, not the system browser itself. Per the Dropbox /oauth2/authorize documentation, we do not support processing the OAuth app authorization flow in web views. (This decision was made in order to support the Google Sign In flow for signing in to Dropbox. That may still work at the moment, but Google has deprecated it, so it will stop working in the future.)

Further, you mentioned that it is working in Chrome, so it appears to be something specific to the Electron web view, so I'm afraid we won't be able to offer help with that anyway, as that's not supported.

That being the case, you should update your app to process the OAuth app authorization flow in the system browser instead.

Re: oAuth 2.0 has stopped working since electron (Chromium client)

TwinBlade
Helpful | Level 5

@Greg-DB

Hey Greg,

Since yesterday morning I have experienced the same issue as leriano. I am using the .NET SDK and haven't changed any code (prior yesterday - everything was working), but the OAuth flow continues forever... When I click "Approve" it starts loading and then ..nothing happens.

On breaking I reach this call: 

var response = await DropboxOAuth2Helper.ProcessCodeFlowAsync(
                   code,
                   Global.AppKey,
                   Global.AppSecret,
                   RedirectUri);

It doens't proceed to returning response and I get no errors


Using Google Chrome Version 69.0.3497.100 

Re: oAuth 2.0 has stopped working since electron (Chromium client)

leriano7
Explorer | Level 3

Hello TwinBlade!

Does it reach your redirect uri???
In Google Chrome 70.0.3538.77 for Mac OSX works great for me.

Thank you!

Re: oAuth 2.0 has stopped working since electron (Chromium client)

TwinBlade
Helpful | Level 5

Hello Leriano,

It redirects to my page, but on there is the method to exchange the code for the token, which is problematic. I updated Chrome today, but I am still having this issue.

Re: oAuth 2.0 has stopped working since electron (Chromium client)

Greg-DB
Dropboxer

@TwinBlade Are you processing this in a web view in an Electron app? If not, it sounds like this isn't necessarilly the same as the original issue in this thread. In that case, please open a new thread with the details of the issue you're seeing. You said "the method to exchange" "is problematic". Please elaborate on that, and include any error or lacking that, explain what unexpected behavior or output it gives. Thanks!

Re: oAuth 2.0 has stopped working since electron (Chromium client)

chrisgch
Explorer | Level 3
I also have this problem on a different platform: Android 4.3 and older, login via WebView. Just like the original poster, users can enter e-mail and password, but it then hangs when the user clicks on "Sign In". I have sent a support request via https://www.dropbox.com/developers/contact with more details. It works fine on Android 4.4 and newer.
Who's talking

Top contributors to this post

  • User avatar
    chrisgch Explorer | Level 3
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?