<!DOCTYPE html>
<html lang="en">
<body>

  <script>

    // Clear the auth tokens and redirect to Universe so it can clear its session

    localStorage.removeItem('universeAccessToken');
    localStorage.removeItem('universeAccessTokenExpiration');
    localStorage.removeItem('universeRefreshToken');
    localStorage.removeItem('universeRefreshTokenExpiration');

    window.location.href = '{{{ fanclub.links.logout }}}';

  </script>

</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="referrer" content="origin">
</head>
<body>

  <a id="redirect" referrerpolicy="origin" style="display:none"></a>
  <script>

    // Clear the auth tokens and redirect to Universe so it can clear its session
    // Make sure to remove the referrer path, to prevent a redirect loop

    localStorage.removeItem('universeAccessToken');
    localStorage.removeItem('universeAccessTokenExpiration');
    localStorage.removeItem('universeRefreshToken');
    localStorage.removeItem('universeRefreshTokenExpiration');

    var redirect = document.getElementById('redirect');
    redirect.href = '{{{ fanclub.links.logout }}}' || '/';
    redirect.click();

  </script>

</body>
</html>

Remove the referrer path when logging out, to prevent a redirect loop
Remove the referrer path when logging out, to prevent a redirect loop
