cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

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

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

Pcrombach
Explorer | Level 3
Go to solution

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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution
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
Explorer | Level 3
Go to solution
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

Greg-DB
Dropbox Staff
Go to solution

Yes, you can use the OAuth app authorization flow to get an access token in a web app. I recommend reading the OAuth guide and the authorization documentation for information on how this works.

Need more support?