Dev-only SDK
Permission testing, minus the context switch
One SDK call to give your developers, PMs, and QA designers instant access to every user role. No more login/logout cycles.
import { ImpersonaProvider } from '@impersona/sdk'
function App() {
return (
<ImpersonaProvider
projectId="your-project-id"
tokenSource={{ type: 'localStorage', key: 'token' }}
/>
)
}Interactive Demo
See it in action
Click on different users to switch contexts instantly. Watch how the UI changes based on permissions.
import { ImpersonaProvider } from '@impersona/sdk'
// Enable user context capture
<ImpersonaProvider
projectId="your-project-id"
tokenSource={{
type: 'localStorage',
key: 'auth_token'
}}
/>
// One click to switch contextsProject Settings
Capabilities
The tool your team keeps meaning to build
Stop the login/logout merry-go-round. Ship faster by giving your entire team the power to verify every role, policy, and edge case instantly.
Context is sacred
Swap roles without losing scroll position, form state, or the debug context you are reviewing.
Whole-team access
PMs, QA, and designers can see the app through any user’s eyes—no developer help required.
Minimal setup
One SDK call. Works alongside any auth provider including Clerk, Supabase, Auth0, or custom JWTs.
Dev-only by design
Tokens never touch production. Environment detection keeps impersonation strictly in local and staging.
Getting Started
Up and running in minutes
Three simple steps to transform your permission testing workflow.
Install the SDK
Add Impersona to your React project. Simple setup, no peer dependencies required.
npm install @impersona/sdkWrap your application
Add the ImpersonaProvider to your root layout. Connect your existing auth token source.
<ImpersonaProvider
projectId="your-project-id"
tokenSource={{
type: 'localStorage',
key: 'token'
}}
>
<App />
</ImpersonaProvider>Capture and test
Login as any user once to capture their context. Switch between captured presets instantly.
// The widget appears in dev mode.
// Click "Capture" to save current context.
// Switch roles without re-logging.Why Impersona?
The old way vs. the Impersona way
See how much time you can save on every permission test.
- ✗Log out of current user
- ✗Find test user credentials
- ✗Log in as test user
- ✗Navigate back to the feature
- ✗Lose scroll & form context
- ✗The login/logout merry-go-round
- ✓Click the widget
- ✓Select a user preset
- ✓Test instantly
- ✓Stay on the same page
- ✓Keep your debug context
- ✓Test any role in seconds
Start Shipping Faster
Your agents build fast. Verify their work with your eyes.
AI tools accelerated your dev velocity. Impersona gives you the same speed when verifying roles, permissions, and edge cases.