<p>Firstly, why are you generating a new token every time if you've still got a valid token in the database?</p>

<p>Secondly, we provide OAuth so you can authenticate people to perform access on openstreetmap.org not so that you can use our database to authenticate users to your web site, and we do not support such (ab)uses of it.</p>

<p>Thirdly, use the OAuth specification to learn how to use OAuth rather than trying to guess from what our web site code does... For the record the <code>authenticity_token</code> is standard parameter that rails attaches to all forms as a security measure but it will be ignored by API methods like that.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1150#issuecomment-179873631">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLSRnakv80MHIb_c6gfrLWV2_f8xBks5pg1lHgaJpZM4HTaGQ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/1150#issuecomment-179873631"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>