Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
vinay05
3 years agoExplorer | Level 3
Logged out from dropbox and login again. It is allowing me to access files without asking credential
I am using ObjectiveDropboxOfficial for my ios objective c project.
Everything is working fine except logout.
Here is the problem,
Step 1: Logged into dropbox.
Step 2: Logged out from dr...
Greg-DB
Dropbox Community Moderator
3 years agoAs you mentioned, when processing the OAuth app authorization flow in an app using ObjectiveDropboxOfficial, SFSafariViewController is used. The web session in SFSafariViewController (such as whether the user is already signed in to www.dropbox.com) is separate from whether or not the ObjectiveDropboxOfficial SDK has any locally stored access/refresh tokens. The clearAllTokens and unlinkAndResetClients methods only affect the locally stored access/refresh tokens, not the web session, so calling those won't sign the user out of the Dropbox web site.
Also, ODBoxHandler isn't made by Dropbox so I can't help with that, but if you're referring to this third party library, it looks like that clientRequestedLogout method just calls unlinkAndResetClients too.
Likewise, while I can't provide support for NSURLCache as that's not made by Dropbox, it sounds like it's not possible to clear the SFSafariViewController session using NSURLCache. For instance, I found this post that indicates it's not possible to interact with or clear SFSafariViewController credentials.
So, it looks like it's not possible to proactively clear out the entire SFSafariViewController session directly. You could clear the cookies for www.dropbox.com in SFSafariViewController however by presenting a SFSafariViewController for the URL "https://www.dropbox.com/logout", though that's not part of the API/SDK, so ObjectiveDropboxOfficial doesn't offer a method for that. Doing so from your own code should work, though it would involve showing the SFSafariViewController UI again.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!