cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

Login form not appear in my xamarin APP

Login form not appear in my xamarin APP

LSE
Explorer | Level 3

A few days in my android App that uses Dropbox.Api (v. 4.9.4) when OAuth2Authenticator loads the login form, user and password fields are not displayed.

6 Replies 6

LSE
Explorer | Level 3

var auth = new OAuth2Authenticator(
clientId: apikey, // your OAuth2 client id
scope: "", // The scopes for the particular API you're accessing. The format for this will vary by API.
authorizeUrl: authorizeUri, // the auth URL for the service
redirectUrl: callbackUri,
isUsingNativeUI: false); // the redirect URL for the service

 

This represents at the moment how our "OAuth2Authenticator" is setted.
By setting the parameter "isUsingNativeUI" to TRUE,  the GUI is correctly displayed (with pass and user filds) but I cannot intercept the opening of the redirect page and capture the token.

I also tried to update to the latest version of the DropBox API but they had no impact

 

Can someone help me?

 

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/70837899/dropbox-login-username-and-password-filds-hidden-xamari... ]

 

Please note that the official Dropbox API v2 .NET SDK does not officially support Xamarin. Given that, and the version number you mentioned, it sounds like you're referring to the Xamarin.Dropbox.Api library, which is not owned or supported by Dropbox.

 

In any case, Dropbox does not support processing the OAuth app authorization flow in a web view like OAuth2Authenticator apparently uses with your original configuration. The OAuth app authorization flow should be processed in the user's system browser. See here for more information.

 

It sounds like using the "isUsingNativeUI" option might be sending it to a supported system browser? Please refer to the OAuth Guide and authorization documentation for information on using the OAuth flow, such as how to get the result from a redirect URI, for instance. For client-side apps, you should use the PKCE version.

LSE
Explorer | Level 3

At the moment, I'm able to show the login form correctly using an exthernal browser but I can't intercept the redirect URI, capture the token and use it.

 

I have tried many solutions, but none of them allow me to complete the authentication phase correctly

 

About OAuth flow-PKCE version, as you suggested, I have not found sufficient examples or documentation to develop a solution with it. 

 

Can you help me whit this?
Or link some examples in xamarin-android?

Greg-DB
Dropbox Staff

We don't have any specific resources or samples for Xamarin in particular unfortunately. I'll pass this along as a feature request but I can't promise if or when that might be implemented.

 

The authorization flow is covered in the OAuth Guide and authorization documentation though. If something in the Dropbox API/OAuth flow isn't working as expected/documented, please share the details so we can take a look and investigate.

 

The official Dropbox SDKs come with some working examples, such as for the official .NET and JavaScript SDKs, for instance:

OnCore
Explorer | Level 3

I'm having the same issue.  I suspect something changed recently on the way the the Dropbox page is created.  This was working awhile back (not sure how long as the tokens were logging it in as expected).  After a logout and tried to log back in, the User & Password fields are missing and the page is drawn incorrectly.

OnCore
Explorer | Level 3

Well whatever it was that got broken by DB is now Working again!  Out of nowhere the page is now displaying properly.  Pfew. 🙂

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    OnCore Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    LSE Explorer | Level 3
What do Dropbox user levels mean?