Hi all,
My deployed React app is being pushed down by about 36 pixels because Salesforce is adding a "Logged in as <user> Log Out" session banner at the very top of the page. Has anyone else experienced this and, if so, does anyone know if there's a way to hide or disable this banner from showing?
#Salesforce Developer
Hey Simon,
Yes, this is documented and configurable, Salesforce has a specific setting called the "Salesforce Notification Banner" that's exactly this "Logged in as [user] Log Out" bar shown above pages served from a Salesforce domain.
To disable it: Setup > search "Session Settings" (or look for the specific banner setting under Setup, it's covered in Salesforce's "Disable the Salesforce Notification Banner" help article), there's a checkbox controlling whether this banner displays. Uncheck it and save.
Since your React app is deployed and served under a Salesforce domain/session context (likely a Visualforce or
Site.com-hosted page, or embedded via a Salesforce Site), this banner is a platform-level session indicator, not something your app's own CSS can hide reliably, that setting is the correct place to control it.
Reference:
https://help.salesforce.com/s/articleView?id=sf.setup_disable_salesforce_banner.htm&language=en_US&type=5