<?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: Saving and restoring a short-term token in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533913#M25710</link>
    <description>&lt;P&gt;If you use authorizeFromControllerV2, the SwiftyDropbox SDK will automatically store and use the refresh token for you. You should just use authorizedClient to get the client and the SDK will take care of the refresh process.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 14:33:10 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-07-19T14:33:10Z</dc:date>
    <item>
      <title>Saving and restoring a short-term token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533910#M25708</link>
      <description>&lt;P&gt;Hi -- still trying to un-mothball and update an old SwiftyDropbox-based app, and migrate it to short-life tokens. &amp;nbsp;The standard auth process is basically working now, but I'm wondering if I can preserve more of its old behaviour.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previously, I saved the long-life token to a plist file, and if it was still valid on app re-start it would simply create the client from the token:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;client = DropboxClient(accessToken : token)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's the equivalent with short-life tokens? &amp;nbsp;Presumably the access token would still work if they quit and relaunch the app within four hours... but is there any way to preserve the refresh token as well, so that they don't then have to re-authorise when that token expires? &amp;nbsp;Would that require implementing a new provider derived from ShortLivedAccessTokenProvider? &amp;nbsp;And if so how would I get the refresh token out of the client to save it in the first place?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 22:33:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533910#M25708</guid>
      <dc:creator>Jon B.1</dc:creator>
      <dc:date>2021-07-26T22:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Saving and restoring a short-term token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533913#M25710</link>
      <description>&lt;P&gt;If you use authorizeFromControllerV2, the SwiftyDropbox SDK will automatically store and use the refresh token for you. You should just use authorizedClient to get the client and the SDK will take care of the refresh process.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:33:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533913#M25710</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-07-19T14:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Saving and restoring a short-term token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533918#M25714</link>
      <description>&lt;P&gt;Brilliant! &amp;nbsp;Nice to know I was overthinking things...&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:46:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533918#M25714</guid>
      <dc:creator>Jon B.1</dc:creator>
      <dc:date>2021-07-19T14:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Saving and restoring a short-term token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533920#M25715</link>
      <description>&lt;P&gt;Just to confirm, though: &amp;nbsp;I'm aware that authorizedClient maintains and refreshes the same tokens while the app is running. &amp;nbsp;But you're saying that if I quit and relaunch the app, authorizedClient persists the tokens and is still valid by default? &amp;nbsp;If so, I'm a very happy man...&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:49:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533920#M25715</guid>
      <dc:creator>Jon B.1</dc:creator>
      <dc:date>2021-07-19T14:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Saving and restoring a short-term token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533933#M25717</link>
      <description>&lt;P&gt;Yes, that's correct.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 15:15:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Saving-and-restoring-a-short-term-token/m-p/533933#M25717</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-07-19T15:15:45Z</dc:date>
    </item>
  </channel>
</rss>

