Hi,
I am currently testing my app by logging in and out of two different accounts in the same browser: one with Editor permissions and the other as a View-only user.
While making edits with the Editor account—which was supposed to only apply to the Production environment—the changes ended up altering the Development environment instead. Upon investigating, I noticed that Retool sets an appEnvironment key in the browser's localStorage to dictate which environment is active.
The problem is that this key persists even after logging out. Because this state is retained, when I log out of the Editor account and log into the Viewer account, the browser keeps the previous environment setting. This causes unintended behavior. I need a way to ensure this localStorage value is wiped the moment a user logs out. Could you help me with this?
Thanks.


