Account management for customer apps
Use Path's hosted account-management page to let your customer app's end users update their name, change their email, or delete their account for your App. Normally that only removes the user's access to your App; it deletes their Path identity, on a recoverable 30-day schedule, only in the exceptional case where the user would otherwise be left with no other App or Organization.
The page uses your App's Path branding and is launched through the Path SDK. Call openAccountManagement() from an explicit user action. Path navigates to /account/manage with App and return context and authenticates with a Platform session. Do not build the URL yourself, and do not treat query parameters as authority. Path revalidates the App and return target on every request.
Add a Manage account action
import { openAccountManagement, useSession } from '@pathsystems/path/auth/client'
export function AccountMenu() {
const session = useSession()
if (!session) return null
return (
<button
type="button"
onClick={() =>
void openAccountManagement({
returnTo: '/settings',
// Optional when VITE_APP_ID / VITE_ORG_ID are already set:
// appId: '...',
// orgId: '...',
})
}
>
Manage account
</button>
)
}
openAccountManagement({ returnTo, appId?, orgId? }) navigates to Path's /account/manage page with:
returnTo: app-relative path; required for a useful return after the hosted flowappId: optional whenVITE_APP_IDis set; required for App-removal contextorgId: optional branding/org hint whenVITE_ORG_IDis set
On a managed web customer app, navigation leaves the current document and the promise does not resolve. The customer app receives the user back on the validated return target when they choose Return to app.
For embedded customer apps, openAccountManagement() uses the Path Way app bridge and resolves with returned, restored, scheduled, email_changed, or unlinked. A scheduled deletion, email_changed, or unlinked result clears local credentials; render an anonymous/sign-in state instead of assuming the prior session is usable. Native callback state is CSRF protection only.
Global identity behavior
An end user has one global Path identity shared across every customer App and Path Organization they can use.
The hosted page's normal destructive action does not delete that identity. It shows Delete [App] account and removes only the end user's direct access to the App that opened the page. Their name, email, and access to other Apps that use the same sign-in are unaffected.
Name and email changes always apply to the shared identity, not just the App that opened the page. Email change requires fresh reauthentication and verification of the new email; after verification, Path signs the identity out everywhere and returns through standard login to /account/manage?app=....
If leaving the source App would leave the user with no other App and no Organization membership, the hosted page instead runs an explicit 30-day cascade that deletes the otherwise-unused Path identity through the same recoverable lifecycle: it requires fresh reauthentication, uses a 30-day recovery period, and lets the user sign in and choose Keep my account, which restores both the identity and the source App access.
Ordinary full Path account deletion is not available from the hosted page. It is reachable only from Platform account settings on path.dev and requires Platform access (access_platform on an active Organization). A customer-app-only end user cannot invoke it from your customer app.
Your customer app controls where it presents the action, but it cannot disable or synchronously veto leaving the App or a Path identity deletion once the page is opened. If you need to warn a user about an active subscription, show that warning before opening the page and handle the lifecycle webhooks described in Identity webhooks.
Security requirements
- Call
openAccountManagement()only from an explicit user action. - Do not construct
/account/manageURLs by hand or treatapp/org/returnToquery params as authority. - Do not ask the user for their Path password in your customer app. Path performs step-up on the hosted page.
- Treat any return after email change, scheduled deletion, or leaving the App (
unlinked) as a sign-out outcome for that App. - Do not build a customer-owned "leave app" or "delete account" endpoint. The hosted page is the only place Path performs these mutations, and full Path account deletion is available only from Platform account settings on
path.dev.