eZplatform – Ibexa automatically log in user in different siteaccesses

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Multilanguage website setup is standard in ezplatform/Ibexa CMS/DXP. Basically, you need to setup a language per siteaccess. Using fallback content language(s) is optional. If you only have one domain then you don’t have really to configure it explicitly in the main configuration file: ezplatform.yaml

If you have a multisite installation with different domains then you have to consider the siteaccesses Map\Host matcher.
ℹ️ More information in: https://doc.ibexa.co/en/latest/guide/multisite/siteaccess_matching/#maphost

On the frontend side, you will have most of the time to add a language switcher so that users are able to switch between the different content languages:

language_switcher_ibexa_ezplatform

Everything will work fine until you will have a login page!

Expected from our above configuration and usability: If a user is logged in to the German website then you are expecting that he will be automatically logged in to the french website just by switching the language.

but it won’t work!

This is because session is not shared between siteaccesses. Below is described in the documentation https://doc.ibexa.co/en/latest/guide/sessions/#session-options-per-siteaccess

ezplatform-ibexa_sessions

It means that per default each siteaccess has a different session name because of the suffix siteaccess _hash.

At this Step, you have to log in to all website languages which is inconvenient.

However, in previous documentation it was mentioned that you can skip the session_hash and by doing it that way the automatic login in different siteaccesses will work.

So you have either to configure it on each siteaccess or much comfortable on siteaccess group level:

It is also possible to share the same session name between the back and the front office. In some situations, you have a protected area in the front office using private sections and you would like to preview the page without login again. This setting can be very useful in the Ibexa experience pagebuilder preview mode as well.