<?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 Re: Confirming token refresh in SwiftyDropbox in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Confirming-token-refresh-in-SwiftyDropbox/m-p/534664#M25743</link>
    <description>&lt;P&gt;If you're using authorizeFromControllerV2, the SDK will take care of the rest for you automatically. It requests "offline" access, so it gets a refresh token, and uses that refresh token to automatically perform the refresh process to get new short-lived access tokens whenever needed, without requiring you to handle that in your own code. That process is done without user interaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to check though, I expect you can peek inside the client using the debugger and look at the short-lived access token. You would need to check both before and after a particular call when a refresh is needed to actually see it change. I don't believe we explicitly log that anywhere in the client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Also, the SDK is open source, so you can follow through the code if you want, e.g., starting with &lt;A href="https://github.com/dropbox/SwiftyDropbox/blob/2f6879b94c5f9fa2841e5fa5fa19ac5ad6fb5623/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift#L50" target="_self"&gt;authorizeFromControllerV2 here&lt;/A&gt;.)&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 14:12:41 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-07-22T14:12:41Z</dc:date>
    <item>
      <title>Confirming token refresh in SwiftyDropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Confirming-token-refresh-in-SwiftyDropbox/m-p/534566#M25741</link>
      <description>&lt;P&gt;As mentioned in another thread, I've been upgrading an app to use short-lived tokens... &amp;nbsp;and it's going very smoothly now. &amp;nbsp;So smoothly that I'm suspicious.&lt;/P&gt;
&lt;P&gt;How can I confirm that it's not actually still using the old long-lived tokens?&lt;/P&gt;
&lt;P&gt;We've changed the app setting on the Dropbox website to short-lived tokens (...at least, I've been *told* they changed it...), and I'm using SwiftyDropbox 6.0.3's authorizeFromControllerV2 to handle the initial authorisation... &amp;nbsp;but I have yet to see Dropbox timeout and prompt for reauthorization under circumstances where I'd expect it to happen.&lt;/P&gt;
&lt;P&gt;We had a test VM which was paused overnight... &amp;nbsp;nine hours later when resumed, it picked up smoothly. &amp;nbsp;Presumably it refreshed the token despite it having expired hours ago? &amp;nbsp;Quitting and relaunching the program didn't force a re-authorization either. &amp;nbsp;I'm currently waiting on the results of quitting the program, waiting at least four hours, and then starting up again.&lt;/P&gt;
&lt;P&gt;Basically, is there any way to confirm that the tokens are actually short-lived ones and that the refreshes are happening? &amp;nbsp;Is it just a matter of extracting and inspecting the token and seeing that it's changed, or is the refresh information logged somewhere?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 22:32:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Confirming-token-refresh-in-SwiftyDropbox/m-p/534566#M25741</guid>
      <dc:creator>Jon B.1</dc:creator>
      <dc:date>2021-07-26T22:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Confirming token refresh in SwiftyDropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Confirming-token-refresh-in-SwiftyDropbox/m-p/534664#M25743</link>
      <description>&lt;P&gt;If you're using authorizeFromControllerV2, the SDK will take care of the rest for you automatically. It requests "offline" access, so it gets a refresh token, and uses that refresh token to automatically perform the refresh process to get new short-lived access tokens whenever needed, without requiring you to handle that in your own code. That process is done without user interaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to check though, I expect you can peek inside the client using the debugger and look at the short-lived access token. You would need to check both before and after a particular call when a refresh is needed to actually see it change. I don't believe we explicitly log that anywhere in the client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Also, the SDK is open source, so you can follow through the code if you want, e.g., starting with &lt;A href="https://github.com/dropbox/SwiftyDropbox/blob/2f6879b94c5f9fa2841e5fa5fa19ac5ad6fb5623/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift#L50" target="_self"&gt;authorizeFromControllerV2 here&lt;/A&gt;.)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 14:12:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Confirming-token-refresh-in-SwiftyDropbox/m-p/534664#M25743</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-07-22T14:12:41Z</dc:date>
    </item>
  </channel>
</rss>

