<p>Hi,</p>

<p>we are using oauth as a login method at <a href="http://www.openstreetmap.cz">www.openstreetmap.cz</a>, but there is an issue -> every time user logs in a new "Oauth access token" is created.</p>

<p>When I obtain a valid access token (oauth_token + oauth_token_secret), i would need to revoke the old pair i saved in the database. (Alternative would be to revoke the newly obtained and use the old one)</p>

<p>On the OSM website there is a resource <code>POST https://www.openstreetmap.org/oauth/revoke</code> which is invoked as a form submit - with:</p>

<pre><code>utf8=%E2%9C%93
&authenticity_token=...
&token=...&commit=Odvolat%21
</code></pre>

<p>I know the token, but <strong>how to construct the authenticity_token</strong>?</p>

<hr>

<p>btw, I tried POSTing to this resource the same way I request api, but it responds with 403.</p>

<div class="highlight highlight-text-html-php"><pre><span class="pl-s1"><span class="pl-smi">$this</span><span class="pl-k">-></span><span class="pl-smi">oauth</span><span class="pl-k">-></span>fetch(<span class="pl-s"><span class="pl-pds">'</span>https://www.openstreetmap.org/oauth/revoke<span class="pl-pds">'</span></span>, [</span>
<span class="pl-s1">                <span class="pl-s"><span class="pl-pds">'</span>token<span class="pl-pds">'</span></span> <span class="pl-k">=></span> <span class="pl-smi">$this</span><span class="pl-k">-></span>getSession(<span class="pl-s"><span class="pl-pds">'</span>oauth<span class="pl-pds">'</span></span>)<span class="pl-k">-></span><span class="pl-smi">token</span></span>
<span class="pl-s1">            ], <span class="pl-c1">OAUTH_HTTP_METHOD_POST</span>);</span></pre></div>

<p>Also i tried to find in this repo, where is the authenticity_token constructed, but didnt find it.<br>
Thanks for help from czech community :-)</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">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLUncj_AtN2kzVN-v6BeyBRfRfQhtks5pg1blgaJpZM4HTaGQ.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"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>