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
aesqe
7 months agoExplorer | Level 4
React Native: is it possible to invoke the installed Dropbox mobile app to authorize a user?
Hello 🙂 I'm working on a React Native app which supports backing up files to Dropbox. I'm using the react-native-app-auth library to authorize my app for access to DB and it all works fine a...
Greg-DB
Dropbox Staff
aesqe The "dbapi" authorization flow you're referring to is a special flow that uses the official Dropbox mobile app, and is built for use by the official Dropbox SDKs on mobile (SwiftyDropbox, dropbox-sdk-obj-c, and dropbox-sdk-java).
Dropbox does not offer official documentation or support for third parties to use that directly, but I'll pass this along as a request for official documentation and support for that. I can't promise if or when that might be released though.
aesqe
7 months agoExplorer | Level 4
Thank you both very much for you input!
Здравко looking at SwiftyDropbox code, it seems like I'll need to calculate the code verifier and code challenge; I'll see if I can somehow grab that from the RN auth library so I don't have to duplicate it in JS, which would be a pain.
Greg-DB just a simple example of what the URI should look like in the docs would be extremely helpful, thank you for passing along the request!
If I manage to resolve this on my own, I'll post an update here 😊
- Здравко7 months agoLegendary | Level 20
aesqe wrote:... looking at SwiftyDropbox code, it seems like I'll need to calculate the code verifier and code challenge; ...
Actually you don't need it, aesqe, but is advisable. You do it when/if need/want use PKCE code flow - again something advisable, not mandatory.
aesqe wrote:... I'll see if I can somehow grab that from the RN auth library so I don't have to duplicate it in JS, which would be a pain.
...
You can "grab" it, ready for use, from different places, including Dropbox Javascript SDK. 😉
By the way, I pointed you to Dropbox Swift SDK only for authorization URI format only, that what asked for at that moment. You may use any other places for examples source though; preferably in JS of course.
Hope this clarifies matter.
- aesqe7 months agoExplorer | Level 4
Здравко the problem is in using crypto in react native, as there is no out-of-the-box support. And, unfortunately, it's the reason why I can't use dropbox js sdk in RN, as it relies directly on crypto in the code (which means a lot of workarounds and manual patching to make it work).
There are a few libraries that add proper random values and sha256 support. I'd just have to test to see which one works for me 👍
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 2 hours 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!