Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

xtremebytes's avatar
xtremebytes
Explorer | Level 3
8 years ago

Re: Switching users in app

Greg-DB


Greg-DB wrote:

 


If instead you want to avoid this behavior and make sure the user has a chance to switch accounts, you can set the forceReapprove parameter to true on DropboxOAuth2Helper.GetAuthorizeUri:

 

https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_DropboxOAuth2Helper_GetAuthorizeUri....

 

Note that the user will still need to manually log out and back in to the desired account on the Dropbox web site itself though, when they're presented with the choice to authorize the app.

 


This thread is now quite old but isn't better to set

forceReauthentication = true

in the API call so that the app presents the login screen and a different user has the chance to login? Semantically, forceReapprove only asks the user to re-approve the app's Dropbox access permissions.

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    xtremebytes It depends on the use case, so it's up to the developer to decide what makes sense for their app. The newer `forceReauthentication` can be more inconvenient than `forceReapprove` though, since the user is forcibly signed out and has to sign in again. With `forceReapprove`, the user can still choose to switch accounts if they want/need. That being the case, I would generally recommend `forceReapprove` over `forceReauthentication`.

  • xtremebytes's avatar
    xtremebytes
    Explorer | Level 3
    8 years ago

    @Grek K. thanks, I see your point about inconvenience. I am probably looking at it from a use-case where the user wants to disable the Dropbox integration and be presented with a user login screen when re-enabled again because it is likely to be disabled with the intent to switch users. There is a slight chance that the user may accidentally overlook the small sign-out link on the re-approval page, and still re-approve as the previously signed-in user. So, perhaps, it does make more sense in my app to set 'forceReauthentication'.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!