In my understanding, once the correct password is entered on a password-protected HubSpot page, continuous access is granted every time the page is revisited. However, I would like to implement a "Logout" button. This would ensure that users are required to re-enter the password upon each visit, following their decision to log out. Has anyone among you been able to implement this?
I believe what you're looking for is a session management feature rather than just a password-protected page. Session management would allow you to log users out after a certain period of inactivity or when they explicitly click a "Logout" button. You might need to use custom code or integrate third-party solutions to achieve this specific functionality with HubSpot.
In this instance, I'm looking to utilize a page that is protected by a password. I'm aware that a cookie is generated once the correct password is entered. This cookie always contains a "_key" and if it's removed, the user will be prompted to re-enter the password upon revisiting the page. However, the cookie with the "_key" is HttpOnly, implying it can only be deleted from the server-side. I attempted to use serverless and "Set-Cookie" to delete the cookie by assigning it an "expires" attribute with a past date value, but it was unsuccessful.
@CBelga because it is a password protected page (using the cookie key) and not a membership page (using sessions) there isn't a way that I know to prevent a returning visitor from accessing the page again unless you change the password or expire the page.
I can't seem to find this Logout custom module. What I know is that you can logout a user by creating a button/link that will redirect them to "/_hcms/mem/logout" but this is for a registration required page and does not work for a password required page