Views: 6895
Last Modified: 06.09.2022

   General description

In some cases, customer uses Bitrix24 Single sign on Single sign authentication is enabled in the Main module settings (option "Spread authorization across all domains").
authentication activated with multisite configuration at the single kernel and for subdomain (for master domain).

For example, when a customer sends a request via Open Channels Bitrix24 Open Channels unify multiple digital communication channels: Facebook, Telegram, WhatsApp, Viber and others.

Customer queries are accumulated in a single chat and are automatically distributed among responsible managers.
- this action requires different authentication data for different services, causing inconvenience.

Your online store is located at shop.com domain, but Bitrix24 is located at the subdomain of this shop crm.shop.com with multisite configuration in use. The online store website has the enabled Bitrix24 widget from crm.shop.com.

With enabled single sign on authentication, upon customer communication via Bitrix24 - this user's current authentication will be updated at the main website (shop.com) and this customer will loose access to customer account, shopping cart with products will be emptied and the website will show error 403, until this customer won't switch to website root.

To avoid this, disable single sign-on at the online store website with 2-level domain (shop.com).

  Solution

  1. Go to online store website control panel (shop.com): Settings > Service Settings > Websites > Websites , select your website and delete the main website's URL in the field Domain name (in this example: shop.com):

  2. Next, proceed by clearing cookie files for the store website using browser's DevTools (F12 > Application > Cookies: mouse right click > Clear):

  3. Next, specify the following code in any template location of the store website (shop.com): Settings > Service Settings > Websites > Site templates:

    <script>
        window.addEventListener('onBitrixLiveChat', function(event){
            var widget = event.detail.widget;
            widget.setOption('checkSameDomain', false);
        });
    </script>
    

    This code disables additional check for Online chat multisite configuration in Bitrix24 Open Channels module (imopenlines 21.400.0 and higher).

    Note: Find more details about website widget configuration in this article.

All is ready. Now, both online store and Bitrix24 website will have different authentications and customers will no longer have issues with loosing their shopping cart contents and Open Channel messages.



Courses developed by Bitrix24