We are participating in the pilot with a customer, and I want to thank you for the great work.
We probably found a bug in session handling in a customer community (using B2B Commerce). We are only able to reproduce it when the custom domain is enabled for the community.
Steps to reproduce it:
- login in to the community (either by using SSO using an OpenID Connect Auth Provider or Login As on contact) --> we are logged in, everything (also remote actions) work well
- export session cookie "sid"
- remove all cookies
- reload the page --> not logged in anymore
- import session cookie "sid"
- reload the page
- without custom domain: logged in again. everything working (also remote actions)
- with custom domain: not logged in, remote actions throw error "Remoting request invalid for your session. Refresh the page and re-submit request" - even a reload doesn't help to recover. Removing session cookie sid helps.
The same also happens if you only modify the session cookie instead of removing and importing it.
I am also not able to reproduce this behavior on production with a custom domain enabled.
As this is very technical to reproduce the behavior, it often happens with normal user behavior browsing the community.
I hope you can help me.
Thanks.
Thomas
As an update regarding this, the "Cache public Visualforce pages" site-level option exists in Summer '21 within the site detail page and is documented in https://help.salesforce.com/articleView?id=sf.sites_caching.htm&type=5 . It can help by having cacheable Visualforce pages cache only within an end-user's web browser and not within infrastructure-level proxy servers and content delivery networks (CDNs). Turning off "Cache public Visualforce pages" in a site can help sites that are typically used by authenticated users instead of by unauthenticated users.