How to Prevent Accidental Account Downgrade in Webflow by Blocking Browser Back Button Navigation

Post author
Dev Dev

[Migrated from the 1.0 community].

------------

Hi all - is it possible to force a log out on a certain page in Webflow?

We basically don't want people hitting the back button and changing their account from a paid to a free accidentally.

Comments

2 comments

  • Comment author
    Duncan from Memberstack

    Let me check with the team on this one. I imagine it would be a simple line or two of code...

    0
  • Comment author
    Duncan from Memberstack
    • Edited

    Nicolas Scott came through with a solution for us 🙏

    <script>
    window
    .$memberstackDom
    .logout().then(() => window.location.replace("/sign-in"));
    </script>


    0

Please sign in to leave a comment.