Dropbox authentication leaves open browser

I'm trying to upload an application to Dropbox, and I downloaded their test program DBRoulette, but I also found strange behavior, which I will now explain

Basically, as soon as you press the button to authenticate the application and authorize it to communicate with your Dropbox, there is a command that the library provides, which

private DropboxAPI mApi;

mApi.getSession () startAuthentication (context) ;.

After executing this command , its own browser opens and displays the Deny or Allow accept or deny authorization buttons, but the problem is that when you click on it, the application returns and shows itself while the native browser is in the background, it is ready to appear again after exiting the application, and this is quite annoying (although this only happens when you first start the application).

ps before I forget, I use the following code in onResume, which is suggested in the tutorial

session.finishAuthentication ();

Thanks to everyone who will help me better understand this problem and (hopefully) solve its authorization redirection in Webview OR close my own browser after clicking the button and authentication

+8
android authentication browser dropbox webview
source share
1 answer

Unfortunately, there is nothing you can do about it.

The authentication process is performed on the server side, i.e. on Dropbox. This means that Dropbox determines the course of action for authenticating the user that you, as a client, must follow. This part of the OAuth thread idea.

What I tested myself is the fact that if you have the official Dropbox application installed, the application is used to authenticate the user (not the browser), and also closes after the user clicks the allow / cancel button.

+3
source share

All Articles