Passkin

Acting as a user (impersonation)

Status: built (2026-10-05). Tests: apps/auth-broker/tests/impersonation.test.ts.

Support needs to see what a customer sees. Passkin does it with actor tokens, as Clerk does, and says so in the tokens, as RFC 8693 asks: the user's ID token and access token carry act: { "sub": "<who is acting>" }, and amr is ["impersonation"]. Your backend can show a banner, refuse destructive actions, and log who really did what.

How

  1. Your backend (secret key) — or the dashboard's Act as user — asks for a ticket:

    curl https://auth.passk.in/v1/actor-tokens \
      -H "Authorization: Bearer $PASSKIN_SECRET_KEY" -H "Content-Type: application/json" -d '{
        "user_id": "user_…",
        "actor": { "sub": "support_42", "name": "Sam from support" },
        "client_id": "pk_live_…",
        "expires_in_seconds": 600,
        "session_max_duration_seconds": 1800
      }'
    # → { "token": "act_…", "expires_at": "…", … }
    

    actor.sub is your own id for the person acting (up to 255 characters). client_id (optional) binds the ticket to one of the project's applications. The ticket is valid for 30 s – 1 h (default 10 min), and the session it opens lasts 1 min – 2 h (default 30 min). From the dashboard the actor is always the person signed in there — the request cannot name someone else.

  2. Your application starts its usual authorization request — with its own PKCE — adding the ticket:

    GET https://auth.passk.in/p/<pk>/authorize?client_id=…&redirect_uri=…&response_type=code&scope=openid email profile
        &code_challenge=…&code_challenge_method=S256&state=…&actor_token=act_…
    

    Passkin does not ask anyone to sign in: it redirects straight back with a code, which your application redeems at the token endpoint with its verifier, as always. A support tool is a small page that does this when it receives ?ticket=….

Rules

  • The ticket works once, before it expires, for the application it names (or any, if none), and only for a person who has signed in (an imported record that no one has claimed has no account to act as), is not banned, and has not disconnected the product — the person's own choice stands.
  • PKCE is not skipped. Only the application that started the flow can redeem the code.
  • Nothing leaks into the person's own sign-in. No Passkin session is started, so impersonating through a browser does not sign that browser in anywhere else; no user.signed_in event is recorded as the person's.
  • The session is short and flagged (sessions.actor, shown as actor in the user's session list) and its refresh tokens keep saying who is acting.
  • It is audited and announced: every use writes user.impersonated to the project's activity log (actor, application, duration) and sends the user.impersonated webhook.
  • Creating tickets is limited to 60 an hour per project.

Not built yet

A dashboard button that opens your site already acting as the user (the API is there; the dashboard needs each application's sign-in address), an email telling the person that support acted on their account (a per-project switch), restrictions on what an impersonating session may do (they are for your backend to enforce, using act), and impersonation of organization members with organization context (arrives with organizations).

Ready to try it?

Create a project — the dashboard fills these snippets in with your own keys.

Open the dashboard