One click back out of an account

An exit affordance clears the impersonation cookie on the current host and returns the operator to the platform console.

What it is

A sidebar control shown only to platform-side users. It clears the cookie in the browser and navigates to the console on the apex with the clear parameter appended, so the server clears it too on the next request.

Also called: exit sub-account · stop acting as · leave impersonation

See it
One click back out of an account
Area
Platform & Admin
Group
Vendor access
System
Multi-Tenancy & Identity
Solves
2 named problems
01The cookie is deleted client-side with an expired max-age; it is path-scoped and not http-only, so this works.
02Navigation goes to the console on the apex with ?as=clear appended.
03Middleware honours the parameter server-side as a second belt.
The sidebar's 'Exit sub-account' control beneath the tenant brand block. src/components/layout/Sidebar.tsx. Sample data — no customer information appears here.
How it works
  1. 1The cookie is deleted client-side with an expired max-age; it is path-scoped and not http-only, so this works.
  2. 2Navigation goes to the console on the apex with ?as=clear appended.
  3. 3Middleware honours the parameter server-side as a second belt.
  4. 4Development and production host shapes are handled separately so the exit works locally too.
Why we built it

The comment describes the failure it prevents: clearing the cookie 'so a later visit to the subdomain doesn't auto-resume impersonation.' Because the cookie is sticky by design — that is what makes navigation work while helping a customer — an operator would otherwise silently re-enter the account days later just by opening a bookmark. Doing it both client-side and via the middleware parameter is called out as belt-and-suspenders in the code.

The problem
  • A sticky impersonation cookie silently resumed on a later visit.
  • Operators had no obvious way back to their own console.
Sound familiar?
What you get
Leaving a customer's account is one click.
The impersonation is cleared in the browser and on the server.
A later visit to that address is a normal visit.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →