# ankane/pretender

Log in as another user in Rails

Repository: https://github.com/ankane/pretender
Canonical: https://ross.abutalabs.com/products/pretender
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-04-02T03:42:50+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 75, release rhythm 35, longevity 100
- inputs: {"age_days": 4929, "days_push": 153, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1427, forks 56 (observed 2026-08-28T04:04:41.815205+00:00)

## What it is
Pretender is a lightweight Ruby gem that lets admins log in as (impersonate) another user in Rails applications. It works with any authentication system like Devise, Authlogic, or Sorcery, and integrates with Action Cable and auditing tools.

## Use cases
- impersonate a user to debug their reported issue
- see exactly what another user sees as an admin
- switch between user accounts during support sessions
- keep audit logs attributed to the true user while impersonating
- add sign-in-as-user functionality to a Rails admin panel

## When to choose
- you run a Rails app and admins need to view the app as another user
- you want minimal code changes and compatibility with any auth library
- you need impersonation that works with Action Cable and audit tools

## When to avoid
- you are not using Ruby on Rails
- you need impersonation with built-in admin UI or authorization controls
- your framework is not Ruby-based

## Facets
- artifact type: library
- maturity: stable
- function: auth, middleware
- domain: web-development, security, developer-tools
- platform: ruby
- tags: rails, user-impersonation, authentication, admin-tools, web-server

## Member repositories
- ankane/pretender (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:41.815205+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:37:21.325109+00:00, confidence not recorded.
  - readme: https://github.com/ankane/pretender (fetched 2026-08-28T04:04:41.815205+00:00, sha 76063eca567f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
