I have a SSO module with a custom login controler.
After login, when the main page is loaded, the customer_data is not available on js.
I read the private content documentation and I'm already invalidating the private content by a
Vendor/ModuleName/etc/frontend/sections.xml file
I created a GitHub issue here describing the issue in detail:
https://github.com/magento/magento2/issues/28428
Can someone help? It seems it affects more people.
Had similar issue.
In file vendor/magento/module-customer/Controller/Account/LoginPost.php
there is a code piece you've probably forgot to add to your custom login action:
if ($this->getCookieManager()->getCookie('mage-cache-sessid')) { $metadata = $this->getCookieMetadataFactory()->createCookieMetadata(); $metadata->setPath('/'); $this->getCookieManager()->deleteCookie('mage-cache-sessid', $metadata); }
However, it should work fine without this code as it is deprecated.
Another reason could be that you've named your custom action in sections.xml wrong - there should be a front name, not a route ID.