<?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: How do I set up Dropbox API for use on a multiple server environment/ load balancing? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158229#M5362</link>
    <description>&lt;P&gt;If I can get to building this I would add a setting that allows the user to either use sessions or cookies.&lt;/P&gt;</description>
    <pubDate>Sat, 09 Jan 2016 05:26:02 GMT</pubDate>
    <dc:creator>Robin H.4</dc:creator>
    <dc:date>2016-01-09T05:26:02Z</dc:date>
    <item>
      <title>How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158223#M5356</link>
      <description>&lt;P&gt;I am using the dropbox php sdk webauth fuctions to allow my customers to authorize Dropbox to allow my site to list their items in dropbox. The site just moved servers to Amazon ELB (elastic load balancing). Now that I have multiple servers I am having issues getting Dropbox to work. I will get the&amp;nbsp;CSRF mismatch error (request leaves from one server and returns on another).&lt;/P&gt;
&lt;P&gt;I have moved the session's to cookies (that's were I store the access token after the request) but I am having issues getting the authorize request working. Is there a way to make this work or do I need to build my Dropbox differently? I will post code if need be, but it pretty much follows the WebAuth example.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-php/blob/master/lib/Dropbox/WebAuth.php" rel="nofollow noreferrer" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-php/blob/master/lib/Dropbox/WebAuth.php&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thank you in advance,&lt;/P&gt;
&lt;P&gt;Robin&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:36:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158223#M5356</guid>
      <dc:creator>Robin H.4</dc:creator>
      <dc:date>2019-05-29T09:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158224#M5357</link>
      <description>&lt;P&gt;The following would be helpful so we can offer some insight:&lt;/P&gt;
&lt;P&gt;- the steps to reproduce the issue&lt;/P&gt;
&lt;P&gt;- the full text of the error/any output&lt;/P&gt;
&lt;P&gt;- the relevant code snippet(s), including any changes you made to "move the session's to cookies"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 02:18:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158224#M5357</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-08T02:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158225#M5358</link>
      <description>&lt;P&gt;Gregory, my code works on a single server (it's alive in production now).&lt;/P&gt;
&lt;P&gt;where the code sets/reads the session data, I just replaced it with cookies. Which will have no baring on handling the authorization request. The exact error is the generic&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"/dropbox-auth-finish: CSRF mismatch: expect ##########, got ########". This is because the request is leaving one server and returning on another. My logs show the request leave and return on different servers. I see no documentation on handling this work flow.&lt;/P&gt;
&lt;P&gt;Have you built dropbox to work with multi-servers before?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 03:48:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158225#M5358</guid>
      <dc:creator>Robin H.4</dc:creator>
      <dc:date>2016-01-09T03:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158226#M5359</link>
      <description>&lt;P&gt;I'm still not clear what change you made exactly regarding the cookies and sessions, but that certainly would be relevant here, as the error is indicating that the CSRF token didn't match what was expected, and the SDK stores the expected CSRF token in the session. You can see that here in the SDK where the exception is thrown:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-php/blob/9db8328c6c035baa0fee48291bd8bd93bcc714b0/lib/Dropbox/WebAuth.php#L246" rel="nofollow noreferrer"&gt;https://github.com/dropbox/dropbox-sdk-php/blob/9db8328c6c035baa0fee48291bd8bd93bcc714b0/lib/Dropbox/WebAuth.php#L246&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;We don't have any specific documentation on how to handle this in an environment like yours, and in any case I suspect it would be specific to the environment, so I&amp;nbsp;recommend looking at how the code works, and updating the your code and/or the SDK as necessary.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:28:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158226#M5359</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T04:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158227#M5360</link>
      <description>&lt;P&gt;I only changed the auth_finish part that retrieves the access token. I didn't change any function within the sdk. So if I change the sdk functions to use cookies instead of sessions it might fix this problem. I appreciate the insight.&lt;/P&gt;
&lt;P&gt;If I can get the php sdk to work in a load balancing environment, can I hand it off to Dropbox and have them maintain the code officially? As more and more people are moving to services with multiple servers, I think it would be helpful.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:44:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158227#M5360</guid>
      <dc:creator>Robin H.4</dc:creator>
      <dc:date>2016-01-09T04:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158228#M5361</link>
      <description>&lt;P&gt;If you have a patch for the SDK that you think will be useful to others, please feel free to submit a pull request on the &lt;A href="https://github.com/dropbox/dropbox-sdk-php" target="_blank" rel="nofollow noreferrer"&gt;dropbox-sdk-php project&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 04:46:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158228#M5361</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-09T04:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158229#M5362</link>
      <description>&lt;P&gt;If I can get to building this I would add a setting that allows the user to either use sessions or cookies.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2016 05:26:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158229#M5362</guid>
      <dc:creator>Robin H.4</dc:creator>
      <dc:date>2016-01-09T05:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158230#M5363</link>
      <description>&lt;P&gt;I got the similar issue,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have hosted my dropbox project in a server, when multiple people try to auth use dropbox auth at same time , it creates&amp;nbsp;&lt;STRONG&gt;CSRF mismatch&lt;/STRONG&gt; problem.&lt;/P&gt;
&lt;P&gt;Example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A user comes to site and click on auth csrf set in session and redirected to dropbox page &amp;nbsp;to authorize (&lt;A href="https://www.dropbox.com/1/oauth2/authorize" rel="nofollow noreferrer"&gt;https://www.dropbox.com/1/oauth2/authorize&lt;/A&gt;) and same time another user click to auth now csrf changed and redirected to dropbox page to authorize. So when first user come to via redirected URI , CSRF MISMATCH problem occurs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there way to customize my app?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 18:58:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158230#M5363</guid>
      <dc:creator>Thamaraiselvam</dc:creator>
      <dc:date>2016-07-13T18:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158231#M5364</link>
      <description>&lt;P&gt;Thamaraiselvam, different users shouldn't be affecting each other's sessions. It sounds like the session system for your app isn't set up correctly. That's a more general problem, and so a bit outside the scope of API support though, so I'm afraid I can't offer support for that. You should refer to the documentation for your web app platform for help configuring sessions properly.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 20:34:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158231#M5364</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-07-13T20:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up Dropbox API for use on a multiple server environment/ load balancing?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158232#M5365</link>
      <description>&lt;P&gt;Gregory ,&lt;/P&gt;
&lt;P&gt;Its okay, I just modified some codes in sdk, now it is working fine.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 20:47:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-set-up-Dropbox-API-for-use-on-a-multiple-server/m-p/158232#M5365</guid>
      <dc:creator>Thamaraiselvam</dc:creator>
      <dc:date>2016-07-13T20:47:49Z</dc:date>
    </item>
  </channel>
</rss>

