We ran into an issue with an attendee who was trying to login to their account. He showed me what he was doing, and he would click Login, enter his credentials, click Log In, and it would redirect him to the external site's homepage without him being logged in. We went through this circular process a few times with some troubleshooting before we identified the issue. On his iPhone, he had set Safari > Block All Cookies to true, meaning that no cookies were stored at all. I tested this behavior on other websites to see how it was handled, and their authentication process was also "broken" with that setting enabled.

So with some JavaScript, you can actually determine if cookies are blocked or not, and if so, display a helpful message so the user can hopefully self-identify the issue, or at least provide a visual clue to someone who may be troubleshooting with them.

IMG_570D8EC5911B-1.png


On any page you'd like for a message to be displayed, like the login page, you just need to add an HTML Content block, with the content showing the following (the message can change, but the div id should be cookieMessage).

Screen_Shot_2022-10-03_at_11.26.51_AM.png

Then in the Post-HTML of the Advanced Settings of the newly added block, add this JavaScript:

Screen_Shot_2022-10-03_at_11.27.13_AM.png

Now when someone visits that page and their cookies are disabled, they'll see a helpful message indicating that the login process doesn't work while cookies are disabled.