alfio-event / alf.io

alf.io - The open source ticket reservation system for conferences, trade shows, workshops, meetups
https://alf.io
GNU General Public License v3.0
1.35k stars 341 forks source link

Iframe embed of reservation process not functional on desktop. #1348

Open doug86i opened 3 months ago

doug86i commented 3 months ago

Describe the bug When embedding the reservation process with an iframe under Wordpress, the front page is displayed but the continue button doesn't function.

To Reproduce Browse to https://goodvibrationssociety.com/test/ Select at least one ticket. Click continue at the bottom

Expected behavior Iframe moves to next step of booking process

Desktop (please complete the following information): Not functional under:

Weirdly the process works on safari for iPhone running IOS 17.3.1

Thanks to all!

cbellone commented 3 months ago

Current situation

This is a known limitation of version M4. Since our application requires a session cookie to work, you can only embed it if the container can be considered "first party" (i.e. same domain).

Since you are embedding a third party domain, the browser will refuse to share cookies, and the application won't work.

Here's an example of working configuration: https://iframe.test.alf.io/ The container shares the same domain (alf.io) with the embedded application (m4.test.alf.io).

Please note that when embedded, alf.io will rely on the parent page to handle special cases, like reservation cancellation. You can see that the text under the iframe changes under certain conditions image

Future development

We have done some work on M5, which should be more resilient and should work when embedded in a third-party context. It would be great if you could test the same setup with an M5 instance (https://github.com/alfio-event/alf.io/pkgs/container/alf.io%2Fdev-main) and confirm that you are able to book a ticket

Thank you!

doug86i commented 3 months ago

Thanks for the situation update! Apologies if it's well documented.

I'll spin up an M5 instance and give it a test.

Many thanks!

cbellone commented 3 months ago

This is an undocumented "beta" feature :) We don't consider this feature "production ready", mostly because of the cookie issue, so we haven't created a proper documentation for it yet. Any help with that in the future would be highly appreciated

Thank you for validating the potential fix on M5! Really appreciated!