Avoid using of local storage for selected dark-mode
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3475773. -->
Reported by: [jan kellermann](https://www.drupal.org/user/371731)
Related to !538 !509 !502
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>If Gin is used as admin theme and the gin_login-module is enabled and a visitor opens the login page, the key `Drupal.gin.darkmode` is written to the local storage of the browser.</p>
<p>Writing data to the browser needs consent (GDPR, in Germany additional TDDDG).</p>
<p>In most cases Gin is only used by the data controller or employees. In this case opening the login page without login write in local storage for any user. To avoid a consent only for this page please remove this use of localstorage.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Install Gin as admin theme. Logout or use private browser tab and open the login page (/user).</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Write to localstorage only on admin pathes.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Write code.</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>Write to localstorage after login.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>No.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>No.</p>
> Related issue: [Issue #3489495](https://www.drupal.org/node/3489495)
issue