Skip to main content
Post sign-in routes: open the prebuilt profile sheet, sign out, sync the user ID into analytics SDKs, switch tenants.

User Profile

Clerk’s prebuilt account-management sheet. The user can edit their profile, manage emails, phones, external accounts, passkeys, sessions, MFA, and delete their account.
Requires the user to be signed in. Emits userprofile with status: "closed" when the sheet dismisses, so you can refresh the UI for any profile edits the user just made.
Errors emit with event: "userprofile": not_configured, unsupported_os, sdk_not_linked.

Sign Out

Revokes the current session server-side, stops the JWT refresher, clears window.clerkJWT, clears attribution IDs, and writes the signed-out cookie state.
Pair with your SPA router:
navigate is your SPA router’s navigation function. Errors emit with event: "signOut": not_configured, signout_failed, unsupported_os, sdk_not_linked.

Multi-Tenant

Call clerk://configure again with a different publishable key. The bridge wipes the secure session store, signs the user out, clears attribution IDs, clears SSR cookies, and re-emits ready with status: "reconfigured".
A second reconfigure while one is in flight returns reconfigure_in_progress. Wait for the first ready before issuing another.

Attribution Sync

Auto-syncs the Clerk userId into OneSignal and AppsFlyer. On by default. Every successful sign-in or sign-up pushes the userId to both SDKs, sign-out or tenant switch clears them.
OneSignal sync only fires when Push Notifications is enabled in the Despia Editor. AppsFlyer sync only fires when AppsFlyer is enabled. To key analytics on your own internal user ID instead of Clerk’s, override after sign-in. Last write wins.

Resources

NPM Package

despia-native