<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Logged out from dropbox and login again. It is allowing me to access files without asking credential in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Logged-out-from-dropbox-and-login-again-It-is-allowing-me-to/m-p/617765#M28448</link>
    <description>&lt;P&gt;I am using&amp;nbsp;ObjectiveDropboxOfficial for my ios objective c project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything is working fine except logout.&lt;/P&gt;
&lt;P&gt;Here is the problem,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Step 1: Logged into dropbox.&lt;/P&gt;
&lt;P&gt;Step 2: Logged out from dropbox.&lt;/P&gt;
&lt;P&gt;Step 3: Trying to login again. It should ask me for login credentials because, i already logged out from dropbox which is not happening. Instead, it directly takes me to after login process screen. I attached the screenshot for that screen below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive.google.com/file/d/14887FaYrUoZZ5fwzbDXSHa0LHEWggqhn/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/14887FaYrUoZZ5fwzbDXSHa0LHEWggqhn/view?usp=sharing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I tried all the possibilities that were given in the sdk, nothing helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code to logout from dropbox&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; [[&lt;/SPAN&gt;&lt;SPAN class=""&gt;ODBoxHandler&lt;/SPAN&gt; sharedHandler&lt;SPAN class=""&gt;] &lt;/SPAN&gt;clientRequestedLogout&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;Cleared cache from browser&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[[&lt;/SPAN&gt;&lt;SPAN class=""&gt;NSURLCache&lt;/SPAN&gt; sharedURLCache&lt;SPAN class=""&gt;] &lt;/SPAN&gt;removeAllCachedResponses&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;NSHTTPCookieStorage&lt;SPAN class=""&gt; *cookieJar = [&lt;/SPAN&gt;NSHTTPCookieStorage &lt;SPAN class=""&gt;sharedHTTPCookieStorage&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN class=""&gt;NSHTTPCookie&lt;/SPAN&gt; *cookie &lt;SPAN class=""&gt;&lt;STRONG&gt;in&lt;/STRONG&gt;&lt;/SPAN&gt; [cookieJar &lt;SPAN class=""&gt;cookies&lt;/SPAN&gt;]) {&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class=""&gt;@"Cookies attached: %@"&lt;/SPAN&gt;, cookie.&lt;SPAN class=""&gt;description&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;(cookie){&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[cookieJar &lt;SPAN class=""&gt;deleteCookie&lt;/SPAN&gt;:cookie];&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Cleared saved access token from keychain and dropbox.&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;DBSDKKeychain&lt;/SPAN&gt; clearAllTokens&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;DBClientsManager&lt;/SPAN&gt; unlinkAndResetClients&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dropbox sdk internally uses&amp;nbsp;SFSafariViewController, where the cache is not cleared until i close the app and reopen again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions would be greatly helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2022 22:11:18 GMT</pubDate>
    <dc:creator>vinay05</dc:creator>
    <dc:date>2022-08-23T22:11:18Z</dc:date>
    <item>
      <title>Logged out from dropbox and login again. It is allowing me to access files without asking credential</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Logged-out-from-dropbox-and-login-again-It-is-allowing-me-to/m-p/617765#M28448</link>
      <description>&lt;P&gt;I am using&amp;nbsp;ObjectiveDropboxOfficial for my ios objective c project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything is working fine except logout.&lt;/P&gt;
&lt;P&gt;Here is the problem,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Step 1: Logged into dropbox.&lt;/P&gt;
&lt;P&gt;Step 2: Logged out from dropbox.&lt;/P&gt;
&lt;P&gt;Step 3: Trying to login again. It should ask me for login credentials because, i already logged out from dropbox which is not happening. Instead, it directly takes me to after login process screen. I attached the screenshot for that screen below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive.google.com/file/d/14887FaYrUoZZ5fwzbDXSHa0LHEWggqhn/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/14887FaYrUoZZ5fwzbDXSHa0LHEWggqhn/view?usp=sharing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I tried all the possibilities that were given in the sdk, nothing helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code to logout from dropbox&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; [[&lt;/SPAN&gt;&lt;SPAN class=""&gt;ODBoxHandler&lt;/SPAN&gt; sharedHandler&lt;SPAN class=""&gt;] &lt;/SPAN&gt;clientRequestedLogout&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;Cleared cache from browser&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[[&lt;/SPAN&gt;&lt;SPAN class=""&gt;NSURLCache&lt;/SPAN&gt; sharedURLCache&lt;SPAN class=""&gt;] &lt;/SPAN&gt;removeAllCachedResponses&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;NSHTTPCookieStorage&lt;SPAN class=""&gt; *cookieJar = [&lt;/SPAN&gt;NSHTTPCookieStorage &lt;SPAN class=""&gt;sharedHTTPCookieStorage&lt;/SPAN&gt;&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;(&lt;SPAN class=""&gt;NSHTTPCookie&lt;/SPAN&gt; *cookie &lt;SPAN class=""&gt;&lt;STRONG&gt;in&lt;/STRONG&gt;&lt;/SPAN&gt; [cookieJar &lt;SPAN class=""&gt;cookies&lt;/SPAN&gt;]) {&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class=""&gt;@"Cookies attached: %@"&lt;/SPAN&gt;, cookie.&lt;SPAN class=""&gt;description&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;(cookie){&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[cookieJar &lt;SPAN class=""&gt;deleteCookie&lt;/SPAN&gt;:cookie];&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Cleared saved access token from keychain and dropbox.&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;DBSDKKeychain&lt;/SPAN&gt; clearAllTokens&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;DBClientsManager&lt;/SPAN&gt; unlinkAndResetClients&lt;SPAN class=""&gt;];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dropbox sdk internally uses&amp;nbsp;SFSafariViewController, where the cache is not cleared until i close the app and reopen again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions would be greatly helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 22:11:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Logged-out-from-dropbox-and-login-again-It-is-allowing-me-to/m-p/617765#M28448</guid>
      <dc:creator>vinay05</dc:creator>
      <dc:date>2022-08-23T22:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Logged out from dropbox and login again. It is allowing me to access files without asking creden</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Logged-out-from-dropbox-and-login-again-It-is-allowing-me-to/m-p/617791#M28449</link>
      <description>&lt;P&gt;As you mentioned, when processing the OAuth app authorization flow in an app using ObjectiveDropboxOfficial, SFSafariViewController is used. The web session in&amp;nbsp;SFSafariViewController (such as whether the user is already signed in to &lt;A href="http://www.dropbox.com" target="_blank"&gt;www.dropbox.com&lt;/A&gt;) 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, ODBoxHandler isn't made by Dropbox so I can't help with that, but if you're referring to &lt;A href="https://github.com/danielbierwirth/DropboxBrowser" target="_blank"&gt;this third party library&lt;/A&gt;, it looks like &lt;A href="https://github.com/danielbierwirth/DropboxBrowser/blob/8d579746b1c5f17511b1524da7dcd3cfd3f49450/ODB%20Classes/ODBoxHandler.m#L93" target="_blank"&gt;that clientRequestedLogout method just calls unlinkAndResetClients&lt;/A&gt; too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 &lt;A href="https://stackoverflow.com/questions/34079135/how-to-clear-sfsafariviewcontroller-credentials" target="_blank"&gt;this post&lt;/A&gt; that indicates it's not possible to interact with or clear SFSafariViewController credentials.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, it looks like it's not possible to proactively clear out the entire SFSafariViewController session directly. You could clear the cookies for &lt;A href="http://www.dropbox.com" target="_blank"&gt;www.dropbox.com&lt;/A&gt; in SFSafariViewController however by presenting a SFSafariViewController for the URL "&lt;A href="https://www.dropbox.com/logout" target="_blank"&gt;https://www.dropbox.com/logout&lt;/A&gt;", 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.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 16:21:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Logged-out-from-dropbox-and-login-again-It-is-allowing-me-to/m-p/617791#M28449</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-08-23T16:21:26Z</dc:date>
    </item>
  </channel>
</rss>

