qmetrics.net

Django Hijack

Admin user impersonation for Django applications

Django Hijack screenshot

Django Hijack lets privileged users log in as another user to troubleshoot or support accounts without knowing their password.

Overview

Django Hijack adds user impersonation to Django sites. Administrators who are allowed to hijack can act as another user in the application session, which is useful for customer support and debugging account-specific issues.

Installation adds the hijack app, HijackUserMiddleware, and URL routes under a configurable path. Templates use the hijack library and a can_hijack filter to show hijack controls only when permitted. Hijacking is performed via POST with CSRF protection, passing the target user’s primary key and an optional next redirect.

Version 3.x is a security-oriented rewrite with easier integration, customization, built-in Django admin buttons, and dark-mode styling; it breaks APIs from 2.x. Optional django-hijack.contrib.admin registers admin list integration, and mixins can attach hijack actions to other models linked to users.

Documentation covers stable releases on Read the Docs for both major versions. Testimonials in the project describe support and troubleshooting scenarios where impersonation saves time.

Key features

  • Session-based user impersonation
  • can_hijack permission filter
  • CSRF-protected hijack POST flow
  • Custom user model support
  • Django admin list integration
  • HijackUserAdminMixin for related models
  • Configurable redirect after hijack
  • Dark-mode capable admin UI (v3)

Use cases

  • Support troubleshooting user accounts
  • Admin reproduction of user-reported bugs
  • Staff actions on behalf of end users

Tags

Similar software

Keycloak

Identity and access management for applications and services

Keycloak adds authentication and single sign-on to applications so they do not store or verify users themselves. It supports standard protocols and central admin tools.

★ 38.1k⟳ todayApache-2.0
Open Source Alternative to:Amazon CognitoAuth0+7

JumpServer

Open-source bastion host for privileged access

JumpServer is a privileged access management platform that unifies secure access to SSH, RDP, Kubernetes, databases, and web assets.

★ 32.1k⟳ yesterdayGPL-3.0
Open Source Alternative to:BeyondTrust

Better Auth

Composable TypeScript authentication and authorization framework

Better Auth is a framework-agnostic authentication and authorization framework for TypeScript. You configure it in code and extend it with plugins for flows like social login, organizations, and enterprise SSO.

★ 30.9k⟳ todayMIT
Open Source Alternative to:Stytch

Infisical

Open-source security infrastructure for secrets, certs, and access

Infisical is a security infrastructure platform where teams manage application secrets, certificates, privileged access, and AI agent credentials in one place.

★ 30.8k⟳ todayMIT · open core
Secrets ManagementSelf-hostable
Open Source Alternative to:Keeper

Authelia

Self-hosted SSO portal with multi-factor authentication

Authentication and authorization server that sits in front of reverse proxies. Provides a web portal for login, OpenID Connect, and granular access rules with several second-factor methods.

★ 29.8k⟳ todayApache-2.0
Open Source Alternative to:Amazon CognitoAuth0+2

NextAuth

Web authentication libraries for JavaScript frameworks

Auth.js (NextAuth) adds sign-in, sessions, and OAuth to modern JavaScript apps. Packages target Next.js, SvelteKit, Express, Qwik, and other runtimes.

★ 28.4k⟳ 4 months agoISC