The site is sending a logged in status and the user display name to the Riddle data layer via Javascript (window.riddleDataLayer.push({ key: ‘display_name’, value: ‘$display_name’ });
Riddle checks if the logged in status is set to “logged-in”. If it is, Riddle’s branching logic proceeds to the info screen and displays the user’s display name. If the user is not logged it, the Riddle branching logic branches to the Riddle block type “Ad/I-Frame”. Inside this block type a barebones WordPress login form is loaded. Post login, the form does two things:
window.parent.postMessage({ ‘ad-iframe-complete’: true } message to the Riddle iFrame, which tells the Riddle to advance after a successful login
Once the user is logged in, Riddle stores the user’s information (display_name and user ID) along with the data from the quiz.
The login data and status is also passed to the main WordPress site. As Riddle does not want to reload the main page though (which would reload the Riddle itself and kill all progress in the Riddle), the login status only updates when you either navigate away from the page or reload the page when the Riddle is finished. On your own site, you could of course update the navbar which shows the login status with AJAX or display a message outside the Riddle iFrame about the login status.