How shall I handle user consent &quot;remember&quot; option
<p>I get consent from user for some operation. While consenting user can check &quot;remember consent&quot; option and this is handled as below:</p>
<ol>
<li>Consent is saved to db</li>
<li>Some action is done and consent is deleted from db</li>
</ol>
<p>But problem is at step 2. If user cancel HTTP request that give us consent after the consent is saved in db, then consent isn't deleted from db. So at another request this consent this consent will be used.</p>
<p>Is it legal behavior?</p>

<p>The GDPR does not prescribe how exactly consent must be managed, as long as consent was obtained in line with the GDPR's principles. Similarly, the EDPB does not provide concrete recommendations in <a href="https://edpb.europa.eu/our-work-tools/our-documents/guidelines/guidelines-052020-consent-under-regulation-2016679_en" rel="nofollow noreferrer">its guidelines on consent</a>, mainly noting that</p>
<blockquote>
<p>Controllers are free to develop methods to comply with this provision in a way that is fitting in their
daily operations.</p>
</blockquote>
<p>I would not be too concerned with edge cases like failing HTTP requests, at least not any more than for other HTTP endpoints. If the user indicated consent, and you act on that indication of consent in good faith, that's probably fine.</p>
<p>However, remember that you must provide a equally easy way for the user to revoke consent later. If the user changes their mind, they can use the mechanism that you offer to inspect their consent status, and revoke it if they want. But again, how to do that is largely up to you.</p>

gdpr consent