You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
LSE
3 years agoExplorer | Level 3
Login form not appear in my xamarin APP
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.
- LSEExplorer | 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 serviceThis 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-DBDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/70837899/dropbox-login-username-and-password-filds-hidden-xamarin-native ]
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.
- LSEExplorer | 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-DBDropbox 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:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!