Forum Discussion

Pcrombach's avatar
Pcrombach
Explorer | Level 3
7 years ago
Solved

What is best practice to supply token to webapplicatie version of mobile app

I know how to achieve oauth token from Dropbox in mobile app. I have a desktop variant of my mobile app. What is the best way to apply the oauth token to the webapp.

 

my suggesties would be to Save the token into the userdata on the backend. Then the frontend van retrieve the token from userdata from the backend.

 

Is there a better approach?

  • Exactly how you structure this is up to you, but you may wish to just have each instance of your app implement the OAuth app authorization flow itself. Having more than one access token per app-user pair is allowed, so you can just have each instance get and store its own access token.

    If you do want them to share an access token, that is also possible. The "best" way to share the access token really depends on what your requirements are. In any case though, make sure the access token is always stored and transported securely, as it is sensitive. I can't offer security advice, so you may want to consult with a security professional for more specific advice for your use case.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Exactly how you structure this is up to you, but you may wish to just have each instance of your app implement the OAuth app authorization flow itself. Having more than one access token per app-user pair is allowed, so you can just have each instance get and store its own access token.

    If you do want them to share an access token, that is also possible. The "best" way to share the access token really depends on what your requirements are. In any case though, make sure the access token is always stored and transported securely, as it is sensitive. I can't offer security advice, so you may want to consult with a security professional for more specific advice for your use case.
    • Pcrombach's avatar
      Pcrombach
      Explorer | Level 3
      Just a quick question: Is there a way to get a token in a webapp on desktop. I just dont understand how the redirection works into a webapp

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 9 hours ago
350 Following

If 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!